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 or +/-)

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.3.0.post3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

viasp-2.3.0.post3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file viasp-2.3.0.post3.tar.gz.

File metadata

  • Download URL: viasp-2.3.0.post3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for viasp-2.3.0.post3.tar.gz
Algorithm Hash digest
SHA256 cd840897c0f2a41405ed97dc2476971db92302981ef80394938aa0ce940c53c5
MD5 89b29d393af912ced04ddabbd2330942
BLAKE2b-256 80224bdd4b31ab879faa40d4d56ce62542fabd6b8b37202e36bcc2c565d12a46

See more details on using hashes here.

Provenance

The following attestation bundles were made for viasp-2.3.0.post3.tar.gz:

Publisher: publish_pypi.yml on potassco/viasp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file viasp-2.3.0.post3-py3-none-any.whl.

File metadata

  • Download URL: viasp-2.3.0.post3-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for viasp-2.3.0.post3-py3-none-any.whl
Algorithm Hash digest
SHA256 92a0f1ba83e412678a6c0f82f37f6a3878ad7931d0161c06a0799fa199bf3444
MD5 b66dc94d8bcc865b5ba01de05dd8a0dd
BLAKE2b-256 a5139a830898da0a5f7117694722f9b1000fafa4dacef2206d63dcb51b5133d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for viasp-2.3.0.post3-py3-none-any.whl:

Publisher: publish_pypi.yml on potassco/viasp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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