Reachability Demo
The example/graph_analysis/reach.dl program computes nodes reachable from a seed set.
.decl Source(id: int32)
.input Source(IO="file", filename="Source.csv", delimiter=",")
.decl Arc(x: int32, y: int32)
.input Arc(IO="file", filename="Arc.csv", delimiter=",")
.decl Reach(id: int32)
.printsize Reach
Reach(y) :- Source(y).
Reach(y) :- Reach(x), Arc(x, y).
Prepare sample data
mkdir -p reach
cat <<'EOF' > reach/Source.csv
1
EOF
cat <<'EOF' > reach/Arc.csv
1,2
2,3
EOFCompile into an executable
flowlog example/graph_analysis/reach.dl -F reach -o reach_bin -D --F reachpoints the compiler at the directory holdingSource.csvandArc.csv.-o reach_binnames the output executable.-D -prints IDB tuples and sizes to stderr instead of writing CSVs.
Run the generated executable
./reach_bin -w 4Adjust
-wto control the number of Timely workers.