Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 2.42 KB

README.md

File metadata and controls

68 lines (46 loc) · 2.42 KB

viASP

Build and Test Documentation Status

viASP generates an interactive visualization of your ASP program and its stable models

Try it out in Binder! Binder

Example visualization

viASP allows you to explore the visualization in a variety of ways:

  • Inspect iterations of recursive rules individually
  • Explain the derivation of symbols with arrows
  • Relax the constraints of unsatisfiable programs
  • Toggle parts of the program
  • Show the added symbols or all of them
  • Inspect a single model
  • Add #show statements on the fly
  • Search models, signatures and rules.

Installation

viASP is available as a conda package. You can install it with:

conda install viasp -c potassco -c conda-forge -c stephanzwicknagl

Alternatively, viASP is also available on PyPI. You can install it with pip:

pip install viasp

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.