Skip to content

Cascading Flow visualization

Jeroen van Dijk edited this page Feb 4, 2014 · 4 revisions

Cascading Flow visualization

Cascading offers functionality to visualize a flow documentation. A flow is what is being run when you call ?- or ?<- in Cascalog.

A simple cascalog query like this:

(?- (stdout) (<- [?a ?b] ([[1 2]] ?a ?b)))

Can be turned into DOT output:

Since https://github.com/nathanmarz/cascalog/commit/0de9b1a8629f92128c67f62f283c1fe6ef5b0e4d

(explain "cascading.dot" (<- [?a ?b] ([[1 2]] ?a ?b)))

otherwise:

(.writeDOT (compile-flow (stdout) (<- [?a ?b] ([[1 2]] ?a ?b))) "cascading.dot")

The cascading.dot file can be turned into an image on the command line:

dot -Tpng cascading.dot  -o cascading.png && open cascading.png

Flow visualziation