├── .editorconfig ├── .github ├── FUNDING.yml └── workflows │ ├── macos.yml │ ├── ubuntu.yml │ └── windows.yml-notyet ├── .gitignore ├── ChangeLog-spell-corrected.diff ├── LICENSE ├── Makefile ├── NEWS.md ├── README.rst ├── admin-tools ├── check-3.8-3.10-versions.sh ├── check-newest-versions.sh ├── checkout_common.sh ├── install-all-3.8-3.10.sh ├── install-all-newest.sh ├── make-dist-3.8-3.10.sh ├── make-dist-newest.sh ├── merge-for-3.8.sh ├── pyenv-3.8-3.10-versions ├── pyenv-newest-versions ├── setup-master.sh ├── setup-python-3.8.sh └── test-versions.sh ├── doc-example ├── and-or.py ├── count-bits.cpython-38.pyc ├── count-bits.py ├── flow+dom-3.8-count-bits.cpython-38--module.dot ├── flow+dom-3.8-count-bits.cpython-38--module.png ├── flow+dom-3.9-and-lambda:x-y.png ├── flow+dom-3.9-or-lambda:a-b.png ├── flow-3.8-count-bits.cpython-38--module.dot └── flow-3.8-count-bits.cpython-38--module.png ├── examples ├── add_edge.py ├── assemble.py ├── for1.py ├── for_else1.py ├── for_if_break.py ├── for_try1.py ├── for_try_else1.py ├── if_else1.py ├── if_else2.py ├── if_for_else1.py ├── if_for_else2.py ├── if_then1.py ├── if_then2.py ├── if_then3.py ├── if_then4.py ├── if_then5.py ├── if_vs_and.py ├── nested_if.py ├── nested_if_else.py ├── seq1.py ├── seq2.py ├── seq3.py ├── try0.py ├── try1.py ├── try2.py ├── try_else1.py ├── try_finally1.py ├── while-break1.py ├── while-if-break1.py ├── while-if-continue1.py ├── while1.py ├── while3.py ├── while_else1.py ├── while_else2.py └── while_else3.py ├── pyproject.toml ├── pytest ├── example_fns.py ├── test_bb.py ├── test_cfg.py └── test_dom.py ├── python_control_flow ├── .gitignore ├── __init__.py ├── __main__.py ├── augment_disasm.py ├── bb.py ├── build_control_flow.py ├── cfg.py ├── dominators.py ├── dotio.py ├── graph.py ├── traversals.py └── version.py ├── requirements-dev.txt ├── setup.py └── test ├── README.rst ├── run-test-bb-8-10.sh ├── test-all-examples.py ├── test-bb.py └── test-bb2.py /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/.editorconfig -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/.github/FUNDING.yml -------------------------------------------------------------------------------- /.github/workflows/macos.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/.github/workflows/macos.yml -------------------------------------------------------------------------------- /.github/workflows/ubuntu.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/.github/workflows/ubuntu.yml -------------------------------------------------------------------------------- /.github/workflows/windows.yml-notyet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/.github/workflows/windows.yml-notyet -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/.gitignore -------------------------------------------------------------------------------- /ChangeLog-spell-corrected.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/ChangeLog-spell-corrected.diff -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/Makefile -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/NEWS.md -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/README.rst -------------------------------------------------------------------------------- /admin-tools/check-3.8-3.10-versions.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/check-3.8-3.10-versions.sh -------------------------------------------------------------------------------- /admin-tools/check-newest-versions.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/check-newest-versions.sh -------------------------------------------------------------------------------- /admin-tools/checkout_common.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/checkout_common.sh -------------------------------------------------------------------------------- /admin-tools/install-all-3.8-3.10.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/install-all-3.8-3.10.sh -------------------------------------------------------------------------------- /admin-tools/install-all-newest.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/install-all-newest.sh -------------------------------------------------------------------------------- /admin-tools/make-dist-3.8-3.10.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/make-dist-3.8-3.10.sh -------------------------------------------------------------------------------- /admin-tools/make-dist-newest.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/make-dist-newest.sh -------------------------------------------------------------------------------- /admin-tools/merge-for-3.8.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/merge-for-3.8.sh -------------------------------------------------------------------------------- /admin-tools/pyenv-3.8-3.10-versions: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/pyenv-3.8-3.10-versions -------------------------------------------------------------------------------- /admin-tools/pyenv-newest-versions: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/pyenv-newest-versions -------------------------------------------------------------------------------- /admin-tools/setup-master.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/setup-master.sh -------------------------------------------------------------------------------- /admin-tools/setup-python-3.8.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/setup-python-3.8.sh -------------------------------------------------------------------------------- /admin-tools/test-versions.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/admin-tools/test-versions.sh -------------------------------------------------------------------------------- /doc-example/and-or.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/and-or.py -------------------------------------------------------------------------------- /doc-example/count-bits.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/count-bits.cpython-38.pyc -------------------------------------------------------------------------------- /doc-example/count-bits.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/count-bits.py -------------------------------------------------------------------------------- /doc-example/flow+dom-3.8-count-bits.cpython-38--module.dot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/flow+dom-3.8-count-bits.cpython-38--module.dot -------------------------------------------------------------------------------- /doc-example/flow+dom-3.8-count-bits.cpython-38--module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/flow+dom-3.8-count-bits.cpython-38--module.png -------------------------------------------------------------------------------- /doc-example/flow+dom-3.9-and-lambda:x-y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/flow+dom-3.9-and-lambda:x-y.png -------------------------------------------------------------------------------- /doc-example/flow+dom-3.9-or-lambda:a-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/flow+dom-3.9-or-lambda:a-b.png -------------------------------------------------------------------------------- /doc-example/flow-3.8-count-bits.cpython-38--module.dot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/flow-3.8-count-bits.cpython-38--module.dot -------------------------------------------------------------------------------- /doc-example/flow-3.8-count-bits.cpython-38--module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/doc-example/flow-3.8-count-bits.cpython-38--module.png -------------------------------------------------------------------------------- /examples/add_edge.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/add_edge.py -------------------------------------------------------------------------------- /examples/assemble.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/assemble.py -------------------------------------------------------------------------------- /examples/for1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/for1.py -------------------------------------------------------------------------------- /examples/for_else1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/for_else1.py -------------------------------------------------------------------------------- /examples/for_if_break.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/for_if_break.py -------------------------------------------------------------------------------- /examples/for_try1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/for_try1.py -------------------------------------------------------------------------------- /examples/for_try_else1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/for_try_else1.py -------------------------------------------------------------------------------- /examples/if_else1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_else1.py -------------------------------------------------------------------------------- /examples/if_else2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_else2.py -------------------------------------------------------------------------------- /examples/if_for_else1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_for_else1.py -------------------------------------------------------------------------------- /examples/if_for_else2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_for_else2.py -------------------------------------------------------------------------------- /examples/if_then1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_then1.py -------------------------------------------------------------------------------- /examples/if_then2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_then2.py -------------------------------------------------------------------------------- /examples/if_then3.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_then3.py -------------------------------------------------------------------------------- /examples/if_then4.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_then4.py -------------------------------------------------------------------------------- /examples/if_then5.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_then5.py -------------------------------------------------------------------------------- /examples/if_vs_and.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/if_vs_and.py -------------------------------------------------------------------------------- /examples/nested_if.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/nested_if.py -------------------------------------------------------------------------------- /examples/nested_if_else.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/nested_if_else.py -------------------------------------------------------------------------------- /examples/seq1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/seq1.py -------------------------------------------------------------------------------- /examples/seq2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/seq2.py -------------------------------------------------------------------------------- /examples/seq3.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/seq3.py -------------------------------------------------------------------------------- /examples/try0.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/try0.py -------------------------------------------------------------------------------- /examples/try1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/try1.py -------------------------------------------------------------------------------- /examples/try2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/try2.py -------------------------------------------------------------------------------- /examples/try_else1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/try_else1.py -------------------------------------------------------------------------------- /examples/try_finally1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/try_finally1.py -------------------------------------------------------------------------------- /examples/while-break1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/while-break1.py -------------------------------------------------------------------------------- /examples/while-if-break1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/while-if-break1.py -------------------------------------------------------------------------------- /examples/while-if-continue1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/while-if-continue1.py -------------------------------------------------------------------------------- /examples/while1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/while1.py -------------------------------------------------------------------------------- /examples/while3.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/while3.py -------------------------------------------------------------------------------- /examples/while_else1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/while_else1.py -------------------------------------------------------------------------------- /examples/while_else2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/while_else2.py -------------------------------------------------------------------------------- /examples/while_else3.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/examples/while_else3.py -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/pyproject.toml -------------------------------------------------------------------------------- /pytest/example_fns.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/pytest/example_fns.py -------------------------------------------------------------------------------- /pytest/test_bb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/pytest/test_bb.py -------------------------------------------------------------------------------- /pytest/test_cfg.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/pytest/test_cfg.py -------------------------------------------------------------------------------- /pytest/test_dom.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/pytest/test_dom.py -------------------------------------------------------------------------------- /python_control_flow/.gitignore: -------------------------------------------------------------------------------- 1 | /__pycache__ 2 | -------------------------------------------------------------------------------- /python_control_flow/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python_control_flow/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/__main__.py -------------------------------------------------------------------------------- /python_control_flow/augment_disasm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/augment_disasm.py -------------------------------------------------------------------------------- /python_control_flow/bb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/bb.py -------------------------------------------------------------------------------- /python_control_flow/build_control_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/build_control_flow.py -------------------------------------------------------------------------------- /python_control_flow/cfg.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/cfg.py -------------------------------------------------------------------------------- /python_control_flow/dominators.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/dominators.py -------------------------------------------------------------------------------- /python_control_flow/dotio.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/dotio.py -------------------------------------------------------------------------------- /python_control_flow/graph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/graph.py -------------------------------------------------------------------------------- /python_control_flow/traversals.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/traversals.py -------------------------------------------------------------------------------- /python_control_flow/version.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/python_control_flow/version.py -------------------------------------------------------------------------------- /requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/setup.py -------------------------------------------------------------------------------- /test/README.rst: -------------------------------------------------------------------------------- 1 | Start with `test_bb.py` and expand 2 | -------------------------------------------------------------------------------- /test/run-test-bb-8-10.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/test/run-test-bb-8-10.sh -------------------------------------------------------------------------------- /test/test-all-examples.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/test/test-all-examples.py -------------------------------------------------------------------------------- /test/test-bb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/test/test-bb.py -------------------------------------------------------------------------------- /test/test-bb2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocky/python-control-flow/HEAD/test/test-bb2.py --------------------------------------------------------------------------------