viASP allows you to explore the visualization in a variety of ways:
- Follow the derivation of answer sets step-by-step
- Explain the derivation of individual symbols with arrows
- Inspect iterations of recursive rules
- Visualize unsatisfiable programs
- Move rules to follow a preferred order
- Zoom in and out of parts of the graph (press
Shift
and scroll)
viASP is available as a PyPI package. You can install it with:
pip install viasp
📝 | To support the use of clingraph in viASP, install graphviz (version 2.50 or greater) manually. |
---|
Consider the file hamiltonian.lp
:
node(1..4). start(1).
edge(1,2). edge(2,3). edge(2,4). edge(3,1).
edge(3,4). edge(4,1). edge(4,3).
{ hc(V,U) } :- edge(V,U).
reached(V) :- hc(S,V), start(S).
reached(V) :- reached(U), hc(U,V).
:- node(V), not reached(V).
:- hc(V,U), hc(V,W), U!=W.
:- hc(U,V), hc(W,V), U!=W.
To start a visualization from the command line, run:
viasp hamiltonian.lp
Check out the documentation to see a full description on how to use viASP.
An introduction to viASP's features is given in the notebook. The examples folder shows a variety of scripts that run viASP.
See the documentation page to see how to contribute.