a visualization tool for clingo.
Project description
viASP
viASP generates interactive visualizations of ASP encodings and stable models
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)
Installation
viASP is available as a PyPI package. You can install it with:
pip install viasp
:memo: | To support the use of clingraph in viASP, install graphviz (version 2.50 or greater) manually. |
---|
Usage
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.
Examples
An introduction to viASP's features is given in the notebook. The examples folder shows a variety of scripts that run viASP.
Contributing
See the documentation page to see how to contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
viasp-2.2.0rc0.tar.gz
(8.4 kB
view details)
Built Distribution
File details
Details for the file viasp-2.2.0rc0.tar.gz
.
File metadata
- Download URL: viasp-2.2.0rc0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a418b666b96fb0649e5ba932523078c560091b41349fd0d8540edd5e5e6c83b2 |
|
MD5 | b73e8e86bc993a5b621ada7f85382d8a |
|
BLAKE2b-256 | fb43b647850da581457df8f39b4fb8ea042425d9e502ff0f1486169b2854c67d |
File details
Details for the file viasp-2.2.0rc0-py3-none-any.whl
.
File metadata
- Download URL: viasp-2.2.0rc0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e59094c286b9623b80c584a51d882bf8d97eab4a506aec66b5ec45dcbd754ac |
|
MD5 | 5e648a7409311b6666fa93735afdc005 |
|
BLAKE2b-256 | d5ca74b21d0dc71d1ded16fd4947bdd9fe47f00c992e0733e902b143b46b1e59 |