Skip to main content

Tools to aid the development of explanation systems using clingo

Project description

clingexplaid

Tools to aid the development of explanation systems using clingo

Installation

Clingo-Explaid easily be installed with pip:

pip install clingexplaid

Requirements

  • python >= 3.9
  • clingo >= 5.7.1

Building from Source

Please refer to DEVELOPEMENT

Usage

Run the following for basic usage information:

clingexplaid -h

Interactive Mode

We provide an interactive terminal user interface (textual) where all modes are accessible in an interactive format. You can start this mode by using the command below.

clingexplaid <files> --interactive

Example: MUS Sudoku

Below is one Example call using our Sudoku Example.

clingexplaid examples/sudoku/encoding.lp examples/sudoku/instance.lp --interactive

Example: Show Decisions

This Example shows the interactive Solver Decision Tree generated from examples/misc/sat_simple.lp.

Clingo Application Class

The clingexplaid CLI (based on the clingo.Application class) extends clingo with <method> and <options>.

clingexplaid <method> <options>
  • <method>: specifies which Clingexplaid method is used (Required)
    • Options:
      • --muc:
        • Computes the Minimal Unsatisfiable Cores (MUCs) of the provided unsatisfiable program
      • --unsat-constraints:
        • Computes the Unsatisfiable Constraints of the unsatisfiable program provided.
      • --show-decisions:
        • Visualizes the decision process of clasp
  • <options>: Additional options for the different methods
    • For --muc:
      • -a, --assumption-signature: limits which facts of the current program are converted to choices/assumptions for finding the MUCs (Default: all facts are converted)
    • For --show-decisions:
      • --decision-signature: limits which decisions are shown in the visualization (Default: all atom's decisions are shown)

Examples

Given the simple program below simple.lp we want to find the contained MUC (Minimal Unsatisfiable Core).

a(1..5).
b(5..10).

:- a(X), b(X).

For this we can call clingexplaid the following way:

clingexplaid examples/misc/simple.lp --muc 0

This converts all facts of the program to choices and assumptions and returns the contained MUC from that.

MUC  1
b(5) a(5)

A selection of more examples can be found here

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

clingexplaid-1.0.16.tar.gz (201.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clingexplaid-1.0.16-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file clingexplaid-1.0.16.tar.gz.

File metadata

  • Download URL: clingexplaid-1.0.16.tar.gz
  • Upload date:
  • Size: 201.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for clingexplaid-1.0.16.tar.gz
Algorithm Hash digest
SHA256 b3236b0566fbcb6125ff109d4fc97692c0f1c949681074c87f746b36ddb58198
MD5 b741e5f580af62fee7732cb3d1ee890a
BLAKE2b-256 80d9872fc583f68412989856ec547c5001b18a2c93484c55b2ea9bf6ec103a75

See more details on using hashes here.

Provenance

The following attestation bundles were made for clingexplaid-1.0.16.tar.gz:

Publisher: deploy.yml on potassco/clingo-explaid

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

File details

Details for the file clingexplaid-1.0.16-py3-none-any.whl.

File metadata

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

File hashes

Hashes for clingexplaid-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 ba68d348d3dd031a912f0d45d964dd4c13738bdd5a3a03071f5a985bdf66764b
MD5 bbb10477ac06bfac08adc4e5784f636f
BLAKE2b-256 3d9cb1c6ee673c9052097f729da2ac195a7834bf2439233d4dc326343e1f3b61

See more details on using hashes here.

Provenance

The following attestation bundles were made for clingexplaid-1.0.16-py3-none-any.whl:

Publisher: deploy.yml on potassco/clingo-explaid

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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page