A Python enGine for Argumentation
Project description
pygarg: A Python enGine for Argumentation
This program solves most classical problems in abstract argumentation, mainly thanks to calls to SAT solvers. Calls to SAT solvers are made through the PySAT API: https://pysathq.github.io/installation/.
This software is still in development. Any suggestion of improvement or bug report is welcome: jean-guy.mailly@irit.fr.
pygarg is also available on PyPI (https://pypi.org/project/pygarg/) and can be installed with the command-line:
pip install pygarg
Command-line Interface
The command-line interface of the current version is as follows:
usage: pygarg [-h] [-p PROBLEM] [-fo FORMAT] [-pr] [-f FILENAME] [-a ARGNAME]
A Python enGine for Argumentation: this program solves most classical problems in abstract argumentation, mainly thanks to calls to SAT solvers.
options:
-h, --help show this help message and exit
-p PROBLEM, --problem PROBLEM
describes the problem to solve. Must be XX-YY with XX in ['DC', 'DS', 'SE', 'EE', 'CE'] and YY in ['CF', 'AD', 'ST', 'CO', 'PR', 'GR', 'ID', 'SST'].
-fo FORMAT, --format FORMAT
format of the input file. Must be in ['apx', 'dimacs'].
-pr, --problems prints the list of supported problems.
-f FILENAME, --filename FILENAME
the input file describing an AF.
-a ARGNAME, --argname ARGNAME
name of the query argument for acceptability problems.
Importing pygarg features
You can import pygarg into your own Python script and use its features as follows.
Text file parsers
import pygarg.dung.apx_parser
import pygarg.dung.dimacs_parser
args, atts = pygarg.dung.apx_parser.parse("test.apx")
args2, atts2 = pygarg.dung.dimacs_parser.parse("test.dimacs")
Extension-based reasoning
import pygarg.dung.solver
for sem in ['CF', 'AD', 'ST', 'CO', 'PR', 'GR', 'ID', 'SST']:
for argname in args:
pygarg.dung.solver.credulous_acceptability(args, atts, argname, sem)
pygarg.dung.solver.skeptical_acceptability(args, atts, argname, sem)
pygarg.dung.solver.compute_some_extension(args, atts, sem)
pygarg.dung.solver.extension_enumeration(args, atts, sem)
pygarg.dung.solver.extension_counting(args, atts, sem)
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
Built Distribution
File details
Details for the file pygarg-1.0.2.tar.gz
.
File metadata
- Download URL: pygarg-1.0.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318697ca9e67380b04299d65e470007c12274a57d13d1f27dfcfe76d359c4d38 |
|
MD5 | 0ddafa0252b22a15d27432e3163619e3 |
|
BLAKE2b-256 | b23b4a5f2b8211c3aa7aaed991aa83fe63c5c9510b18273af0d5ff2e16b0e2f7 |
File details
Details for the file pygarg-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: pygarg-1.0.2-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3dbb67cb8031c01751b2bd147c6beae1bdf27e9ed53eb880f0b899e58f1bd29 |
|
MD5 | 5b47164772dea116d6fd839f003c2e39 |
|
BLAKE2b-256 | 73f5bb421c37d53aa9eae9043ae9ff4201206715d3d6ad8a573d84b72ca14a31 |