Skip to content

patricker/argumentation

Repository files navigation

argumentation

Formal argumentation in Rust: Dung abstract argumentation frameworks (1995) and ASPIC+ structured argumentation (Modgil & Prakken 2014).

Crates.io Docs.rs

What it is

A pure-Rust implementation of two canonical argumentation frameworks from the AI literature:

  1. 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.
  2. 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.

What it isn't

  • 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.

Quick start

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.

v0.2.0 highlights

  • 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.

Performance

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.

References

License

Dual-licensed under MIT or Apache-2.0 at your option.

About

Rust crate implementing Dung-style abstract argumentation frameworks and ASPIC+ structured argumentation.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors