Skip to main content

ValueBasedFramework

Struct ValueBasedFramework 

Source
pub struct ValueBasedFramework<A: Clone + Eq + Hash> { /* private fields */ }
Expand description

A value-based argumentation framework: an underlying Dung framework plus a ValueAssignment mapping arguments to the values they promote.

Acceptance is computed per audience — there is no audience-independent notion of acceptance in a VAF. See Self::accepted_for.

§Type parameter

A is the argument label type, matching the underlying ArgumentationFramework<A>. For encounter-bridge use, this is typically argumentation::ArgumentId; for standalone use &'static str or String work fine.

Implementations§

Source§

impl<A: Clone + Eq + Hash + Ord + Debug> ValueBasedFramework<A>

Source

pub fn new(base: ArgumentationFramework<A>, values: ValueAssignment<A>) -> Self

Construct from a Dung framework and value assignment.

Source

pub fn base(&self) -> &ArgumentationFramework<A>

Borrow the underlying Dung framework (unconditioned attacks).

Source

pub fn value_assignment(&self) -> &ValueAssignment<A>

Borrow the value assignment.

Source

pub fn defeat_graph( &self, audience: &Audience, ) -> Result<ArgumentationFramework<A>, Error>

Build the audience-conditioned defeat graph as a fresh ArgumentationFramework.

An attack (attacker, target) in Self::base becomes a defeat in the result iff defeats(attacker, target) returns true under this audience.

§Defeat rule (Kaci & van der Torre 2008, Pareto-defeating)

Given multi-value assignments, A defeats B iff for every value v_b promoted by B, there is some value v_a promoted by A such that v_b is not strictly preferred over v_a under the audience. This degenerates to Bench-Capon (2003) when each argument promotes exactly one value.

§Special cases
  • Attacker promotes no value → A defeats B (unconditional).
  • Target promotes no value → A defeats B (no preference can save B).
  • Either value is unranked in the audience → considered incomparable (no strict preference); the attacker side wins ties.
Source

pub fn defeats(&self, attacker: &A, target: &A, audience: &Audience) -> bool

Returns true iff attacker defeats target under the audience. Both arguments must already be in the underlying framework’s attack graph (i.e., attacker attacks target in the base); this method only filters by value preference. Calling this with non-attacking pairs is meaningless but not an error.

Source

pub fn accepted_for(&self, audience: &Audience, arg: &A) -> Result<bool, Error>

Audience-conditioned credulous acceptance under preferred semantics.

Returns Ok(true) iff arg is in some preferred extension of the audience-conditioned defeat graph.

Source

pub fn grounded_for(&self, audience: &Audience) -> Result<HashSet<A>, Error>

Audience-conditioned grounded extension (Dung 1995).

Returns the unique skeptically-accepted set under the audience-conditioned defeat graph. The grounded extension is computed by the upstream argumentation crate via least-fixed-point of the characteristic function (not via intersection of preferred extensions, which is the ideal extension and may be a strict superset on non-well-founded frameworks).

Source

pub fn subjectively_accepted(&self, arg: &A) -> Result<bool, Error>

Subjective acceptance — accepted by some total ordering of values in this framework. See crate::acceptance::subjectively_accepted.

Source

pub fn objectively_accepted(&self, arg: &A) -> Result<bool, Error>

Objective acceptance — accepted by every total ordering of values in this framework. See crate::acceptance::objectively_accepted.

Trait Implementations§

Source§

impl<A: Clone + Clone + Eq + Hash> Clone for ValueBasedFramework<A>

Source§

fn clone(&self) -> ValueBasedFramework<A>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A: Debug + Clone + Eq + Hash> Debug for ValueBasedFramework<A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<A> Freeze for ValueBasedFramework<A>

§

impl<A> RefUnwindSafe for ValueBasedFramework<A>
where A: RefUnwindSafe,

§

impl<A> Send for ValueBasedFramework<A>
where A: Send,

§

impl<A> Sync for ValueBasedFramework<A>
where A: Sync,

§

impl<A> Unpin for ValueBasedFramework<A>
where A: Unpin,

§

impl<A> UnsafeUnpin for ValueBasedFramework<A>

§

impl<A> UnwindSafe for ValueBasedFramework<A>
where A: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.