Skip to content

Commit

Permalink
cleanup README
Browse files Browse the repository at this point in the history
* Update build instructions
* Remove outdated documentation

The example in the README was no longer working. So we remove the
example altogether, no documentation is better than outdated
documentation which will just be misleading and/or frustrating for
users.
  • Loading branch information
esc committed May 7, 2024
1 parent 52f6ed0 commit cb7c4c0
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 66 deletions.
67 changes: 1 addition & 66 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,76 +37,11 @@ If you have `make` and `conda` available, a common workflow could be:
```
$ make conda-env # setup conda environment
$ conda activate numba-rvsdg # activate it
$ make # "build" the project
$ make test # run all tests
$ make docs # build the docs
$ open docs/build/html/index.html # view the docs (OSX)
$ make # lint, build and test the project
```

Feel free to look at the `makefile` for low-level commands.


## overview

The following files are included in this repository:

```
numba_rvsdg
├── __init__.py
├── core
│   ├── datastructures
│   │   ├── basic_block.py # BasicBlock implementation
│   │   ├── scfg.py # SCFG implementation, maps names to blocks
│   │   ├── byte_flow.py # ByteFlow implementation, SCFG + bytecode
│   │   ├── flow_info.py # Converts program to ByteFlow
│   ├── transformations.py # Algorithms
│   └── utils.py # Miscellaneous utilities
├── networkx_vendored
│   └── scc.py # Strongly Connected Componets (loop detection)
├── rendering
│   └── rendering.py # Graphivz based rendering of SCFGs
├── tests
│   ├── simulator.py # Simulator utility for running SCFGs
│   ├── test_byteflow.py # Testung ByteFlow and others
│   ├── test_fig3.py # Testing fig. 3 from Bahman2015
│   ├── test_fig4.py # Testing fig. 4 from Bahman2015
│   ├── test_simulate.py # Simulator based testing
│   └── test_transforms.py # Testing graph transformations
└── utils
```

## example

The following will process the given example function and display the four
different stages. "initial" is the unprocessed bytecode as produced by
cpython. "closed" is simply the closed variant of the initial CFG. "loop
restructuring" is the loop-restructured version and "branch-restructured" is
the final form which includes closing, loop-restructuring and
branch-restructuring.


```python
# Example: for loop with branch and early exit

from numba_rvsdg.rendering.rendering import render_func

def foo(n):
c = 0
for i in range(n):
c += 1
if i == 100:
break
return c

render_func(foo)

```

![initial](docs/images/initial.png "initial")
![closed](docs/images/closed.png "closed")
![loop-restructured](docs/images/loop_restructured.png "loop-restructured")
![branch-restructured](docs/images/branch_restructured.png "branch-restructured")

## references

* `Reismann2020` -- https://arxiv.org/pdf/1912.05036.pdf -- Describes the concept of RVSDGs
Expand Down
Binary file removed docs/images/before.png
Binary file not shown.
Binary file removed docs/images/branch_restructured.png
Binary file not shown.
Binary file removed docs/images/closed.png
Binary file not shown.
Binary file removed docs/images/initial.png
Binary file not shown.
Binary file removed docs/images/loop_restructured.png
Binary file not shown.

0 comments on commit cb7c4c0

Please sign in to comment.