pub struct ArgumentationFramework {
pub arguments: HashMap<u64, Argument>,
pub attacks: Vec<Attack>,
pub metadata: u64,
}Expand description
Abstract argumentation framework
Fields§
§arguments: HashMap<u64, Argument>§attacks: Vec<Attack>§metadata: u64Implementations§
Source§impl ArgumentationFramework
impl ArgumentationFramework
Sourcepub fn add_argument(&mut self, argument: Argument)
pub fn add_argument(&mut self, argument: Argument)
Add an argument to the framework
Sourcepub fn add_attack(&mut self, attack: Attack)
pub fn add_attack(&mut self, attack: Attack)
Add an attack relation
Sourcepub fn get_attackers(&self, target_id: u64) -> Vec<&Argument>
pub fn get_attackers(&self, target_id: u64) -> Vec<&Argument>
Get all arguments that attack a given argument
Sourcepub fn get_attacked(&self, attacker_id: u64) -> Vec<&Argument>
pub fn get_attacked(&self, attacker_id: u64) -> Vec<&Argument>
Get all arguments that are attacked by a given argument
Sourcepub fn grounded_extension(&self) -> HashSet<u64>
pub fn grounded_extension(&self) -> HashSet<u64>
Compute grounded extension (unique least fixed point of the characteristic function).
Algorithm (Dung 1995): GE ← ∅ Repeat: 1. Collect all arguments that are defeated by GE (attacked by some member of GE). 2. For every remaining argument a not yet in GE: if every attacker of a is defeated by GE, add a to GE. Until no change.
Sourcepub fn preferred_extensions(&self) -> Vec<HashSet<u64>>
pub fn preferred_extensions(&self) -> Vec<HashSet<u64>>
Compute preferred extensions (maximal conflict-free sets)
Sourcepub fn is_conflict_free(&self, args: &HashSet<u64>) -> bool
pub fn is_conflict_free(&self, args: &HashSet<u64>) -> bool
Check if a set of arguments is conflict-free (no attacks within the set)
Sourcepub fn is_admissible(&self, args: &HashSet<u64>) -> bool
pub fn is_admissible(&self, args: &HashSet<u64>) -> bool
Check if a set of arguments is admissible (conflict-free and defends all its members)
Sourcepub fn argument_status(&self, arg_id: u64) -> ArgumentStatus
pub fn argument_status(&self, arg_id: u64) -> ArgumentStatus
Compute the argumentation status of an argument
Sourcepub fn resolve_skeptically(&self) -> HashSet<u64>
pub fn resolve_skeptically(&self) -> HashSet<u64>
Resolve a debate using skeptical reasoning (intersection of all preferred extensions)
Sourcepub fn resolve_credulously(&self) -> HashSet<u64>
pub fn resolve_credulously(&self) -> HashSet<u64>
Resolve a debate using credulous reasoning (union of all preferred extensions)
Sourcepub fn stable_extensions(&self) -> Vec<HashSet<u64>>
pub fn stable_extensions(&self) -> Vec<HashSet<u64>>
Stable extensions (Dung): a conflict-free set that attacks every argument outside it. Computed by testing each conflict-free subset (exponential — bounded by frame size, as abstract frameworks here are small). Every stable extension is also preferred.
Sourcepub fn is_stable(&self, args: &HashSet<u64>) -> bool
pub fn is_stable(&self, args: &HashSet<u64>) -> bool
Is args a stable extension: conflict-free and attacks every argument not in it?
Sourcepub fn complete_extensions(&self) -> Vec<HashSet<u64>>
pub fn complete_extensions(&self) -> Vec<HashSet<u64>>
Complete extensions (Dung): an admissible set that contains every argument it defends (its own fixed point under the characteristic function). The grounded extension is the least complete extension; each preferred extension is a maximal complete one.
Sourcepub fn defends(&self, args: &HashSet<u64>, arg: u64) -> bool
pub fn defends(&self, args: &HashSet<u64>, arg: u64) -> bool
Does args defend arg (every attacker of arg is attacked by args)?
Sourcepub fn is_complete(&self, args: &HashSet<u64>) -> bool
pub fn is_complete(&self, args: &HashSet<u64>) -> bool
Is args a complete extension: admissible and contains every argument it defends?
Trait Implementations§
Source§impl Clone for ArgumentationFramework
impl Clone for ArgumentationFramework
Source§fn clone(&self) -> ArgumentationFramework
fn clone(&self) -> ArgumentationFramework
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ArgumentationFramework
impl RefUnwindSafe for ArgumentationFramework
impl Send for ArgumentationFramework
impl Sync for ArgumentationFramework
impl Unpin for ArgumentationFramework
impl UnsafeUnpin for ArgumentationFramework
impl UnwindSafe for ArgumentationFramework
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more