superflow/README.md

42 lines
1.3 KiB
Markdown

<!--
SPDX-FileCopyrightText: 2025 Ämin Baumeler <amin@indyfac.ch>
SPDX-License-Identifier: GPL-3.0-or-later
-->
# Superflow
To compile, simply run `make`.
The `./tools/` directory contains two python scripts with which we can
transform the output of `./superflow` to the [DOT
language](https://graphviz.org/doc/info/lang.html) for graph visualization. The
require the [NumPy](https://numpy.org/) package.
## Usage
```
Usage: ./superflow [-o | -d]
Reads adjacency vector of a simple digraph from stdin, and
-o [o]utputs the superflow to stdout,
-d [d]ecides if the superflow has nontrivial leafs.
All adjacency vectors are encoded as follows. An entry 1 in
coordinate (u,v) denotes the presence of the arc u<-v. An entry 0 at
said coordinate, denotes the absence of the arc u<-v. The
coordinates are ordered lexicographically, with the entries (u,u)
missing.
When using the -o option, the output as follows:
<adjacency vector of superflow digraph>
<vertex lables of causal structure 0>:<adjacency vector 0>
<vertex labels of causal structure 1>:<adjacency vector 1>
...
<vertex labels of causal structure k>:<adjacency vector k>
When using the -d option, the output is informative. Additionally,
the return code is 0 if all leafs are trivial, and 1 otherwise.
LIMITATION: The input graph has at most 9 vertices.
```