Formal argumentation in Rust: Dung abstract argumentation frameworks (1995) and ASPIC+ structured argumentation (Modgil & Prakken 2014).
A pure-Rust implementation of two canonical argumentation frameworks from the AI literature:
- Dung 1995 abstract argumentation — arguments are opaque nodes, attacks are directed edges, and the library computes grounded, complete, preferred, stable, ideal, and semi-stable extensions, plus Caminada three-valued labellings.
- ASPIC+ structured argumentation — arguments are trees built from a knowledge base and strict/defeasible rules, with preference-based defeat resolution. The ASPIC+ layer automatically emits an abstract AF that the Dung layer evaluates.
Both layers are independently usable. Ships with parsers for the ICCMA APX and TGF benchmark formats.
- Not a natural-language argument miner.
- Not an LLM-powered debater.
- Not an ICCMA-competition-winning solver (subset enumeration, not SAT-based — see Performance).
- Not a theorem prover.
use argumentation::ArgumentationFramework;
let mut af = ArgumentationFramework::new();
af.add_argument("a");
af.add_argument("b");
af.add_argument("c");
af.add_attack(&"a", &"b").unwrap();
af.add_attack(&"b", &"c").unwrap();
let grounded = af.grounded_extension();
assert!(grounded.contains(&"a") && grounded.contains(&"c"));See src/lib.rs for the ASPIC+ quick example.
- Premise-level preferences via
StructuredSystem::prefer_premise. The M&P 2014 running example (Example 3.7/3.22) now encodes faithfully. - Weakest-link defeat ordering via
DefeatOrdering::WeakestLink. The M&P 2014 Whisky example (Example 3.26) resolves to the paper's expected outcome. - Rationality postulate checks via
BuildOutput::check_postulates. Validates a given extension against the four Caminada-Amgoud postulates (sub-argument closure, closure under strict rules, direct consistency, indirect consistency). - Labelling-primary API:
grounded_labelling,preferred_labellings,stable_labellings,ideal_labelling,semi_stable_labellings— thin wrappers matching the extension methods.
Current implementation uses subset-enumeration for extension semantics, which is exponential in the number of arguments. Practical up to ~20 arguments. Larger instances will need SAT/ASP solvers in a future version.
- Dung, P.M. (1995). On the acceptability of arguments... AIJ 77(2).
- Modgil, S. & Prakken, H. (2014). The ASPIC+ framework for structured argumentation. Argument & Computation 5(1).
- Baroni, P., Caminada, M., Giacomin, M. (2011). An introduction to argumentation semantics. KER 26(4).
- ICCMA benchmark instances.
Dual-licensed under MIT or Apache-2.0 at your option.