Observed since 20 Oct, 21:13 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Lightweight solver for Dung-style argumentation framework semantics (conflict-free, admissible, complete, preferred, grounded, stable extensions)
A lightweight Python solver for Dung-style abstract argumentation framework (AF) semantics: conflict-free, admissible, complete, preferred, grounded, and stable.
uv add afsolver
or with pip:
pip install afsolver
from afsolver import ArgumentationFramework
af = ArgumentationFramework(
arguments=["a", "b", "c"],
attacks=[("a", "b"), ("b", "a"), ("c", "b")], # a<->b mutual attack, c attacks b
)
af.preferred() # [frozenset({'a', 'c'})]
af.grounded() # frozenset({'a', 'c'})
af.extensions() # dict with all six semantics at once
arguments is optional — if omitted, arguments are inferred from the
attacks pairs:
af = ArgumentationFramework(attacks=[("b", "a"), ("c", "b"), ("d", "c")])
af.arguments # ('b', 'a', 'c', 'd')
Attack pairs can be tuples or lists — both are accepted and normalized to tuples internally.
ArgumentationFramework(arguments=(), attacks=())
| Method | Returns |
|---|---|
.conflict_free() | list[frozenset] — conflict-free sets |
.admissible() | list[frozenset] — admissible sets |
.complete() | list[frozenset] — complete extensions |
.preferred(contains=None) | list[frozenset] — preferred (maximal admissible) extensions, optionally restricted to those containing all arguments in contains |
.grounded() | frozenset — the (unique) grounded extension |
.stable() | list[frozenset] — stable extensions |
.minimal_admissible(contains=None) | list[frozenset] — non-empty admissible sets minimal by set inclusion, optionally restricted to those containing all arguments in contains |
.extension(name) | dispatch to any of the six semantics above by string name |
.extensions() | dict[str, ...] — all six semantics computed at once |
preferredWith no contains argument, returns all preferred extensions. Pass
contains to restrict the result to only those that include a given
argument (or set of arguments):
af = ArgumentationFramework(
["a", "b", "c", "d", "e"],
[("b", "a"), ("c", "b"), ("d", "b"), ("c", "e"), ("e", "c")],
)
af.preferred() # [{'a', 'c', 'd'}, {'a', 'd', 'e'}]
af.preferred(contains=["a", "c"]) # [{'a', 'c', 'd'}]
minimal_admissibleWith no contains argument, returns the smallest non-trivial admissible
sets overall. Pass contains to restrict the result to the smallest
admissible sets that include a given argument (or set of arguments):
af = ArgumentationFramework(
["a", "b", "c", "d", "e"],
[("b", "a"), ("c", "b"), ("d", "b"), ("c", "e"), ("e", "c")],
)
af.minimal_admissible() # [{'c'}, {'d'}, {'e'}]
af.minimal_admissible(contains=["a"]) # [{'a', 'c'}, {'a', 'd'}]
The empty set is always excluded — it's trivially admissible and a subset of everything else, so including it would hide the smallest non-trivial results.
uv sync # install project + dev dependencies
uv run pytest -q # run tests
uv build # build sdist + wheel
pypistats · 57 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-18 – 2026-10-18 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-15 – 2026-10-15 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-13 – 2026-10-13 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-10 – 2026-10-10 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-09 – 2026-10-09 | 5 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-08 – 2026-10-08 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-06 – 2026-10-06 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-02 – 2026-10-02 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-10-01 – 2026-10-01 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-30 – 2026-09-30 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-28 – 2026-09-28 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-27 – 2026-09-27 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-26 – 2026-09-26 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-25 – 2026-09-25 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-24 – 2026-09-24 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-21 – 2026-09-21 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-20 – 2026-09-20 | 4 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-16 – 2026-09-16 | 4 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-15 – 2026-09-15 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-14 – 2026-09-14 | 6 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-13 – 2026-09-13 | 4 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-12 – 2026-09-12 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-08 – 2026-09-08 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-07 – 2026-09-07 | 4 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-06 – 2026-09-06 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-04 – 2026-09-04 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-09-01 – 2026-09-01 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-31 – 2026-08-31 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-29 – 2026-08-29 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-28 – 2026-08-28 | 4 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-27 – 2026-08-27 | 4 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-24 – 2026-08-24 | 6 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-23 – 2026-08-23 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-22 – 2026-08-22 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-20 – 2026-08-20 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-19 – 2026-08-19 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-18 – 2026-08-18 | 3 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-17 – 2026-08-17 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-14 – 2026-08-14 | 6 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-13 – 2026-08-13 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-11 – 2026-08-11 | 3 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-09 – 2026-08-09 | 8 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-08 – 2026-08-08 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-07 – 2026-08-07 | 4 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-06 – 2026-08-06 | 5 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-04 – 2026-08-04 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-03 – 2026-08-03 | 9 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-02 – 2026-08-02 | 9 | 2026-10-21T15:02:53.6677056Z |
| 2026-08-01 – 2026-08-01 | 93 | 2026-10-21T15:02:53.6677056Z |
| 2026-07-31 – 2026-07-31 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-07-30 – 2026-07-30 | 6 | 2026-10-21T15:02:53.6677056Z |
| 2026-07-29 – 2026-07-29 | 1 | 2026-10-21T15:02:53.6677056Z |
| 2026-07-28 – 2026-07-28 | 2 | 2026-10-21T15:02:53.6677056Z |
| 2026-07-27 – 2026-07-27 | 7 | 2026-10-21T15:02:53.6677056Z |
| 2026-07-25 – 2026-07-25 | 9 | 2026-10-21T15:02:53.6677056Z |
| 2026-07-24 – 2026-07-24 | 105 | 2026-10-21T15:02:53.6677056Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 1 Aug 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:13 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:2a89f66da7493d387d859dfdcc636a0e3a15ea06ae4da58bf6a8021a91561ef6