Skip to main content

a visualization tool for clingo.

Project description

viASP

Build and Test Documentation Status

viASP generates interactive visualizations of ASP encodings and stable models

Example visualization

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


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.0.0rc1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

viasp-2.0.0rc1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file viasp-2.0.0rc1.tar.gz.

File metadata

  • Download URL: viasp-2.0.0rc1.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

Hashes for viasp-2.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 db97c6a435c3b588b91599343a326a20752043b8c041addbeb508a4661b5881a
MD5 718b8f5a0d2db0742d33664087f2efab
BLAKE2b-256 4ff47abf24281cc6fd12412037ca1f3ad33a0f34249872925ba7424c82264c3b

See more details on using hashes here.

File details

Details for the file viasp-2.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: viasp-2.0.0rc1-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

Hashes for viasp-2.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 3dfbc21220853565fbbc9de509338e9401e4e2e8e63ee0f743290ee660edac12
MD5 a3f336a4183e1661672a6a2e2abd71ed
BLAKE2b-256 fdaace317d62b35f926134b23dad8959baa0d092f3265e5ccf44ed43456ad8be

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page