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>
impl<A: Clone + Eq + Hash + Ord + Debug> ValueBasedFramework<A>
Sourcepub fn new(base: ArgumentationFramework<A>, values: ValueAssignment<A>) -> Self
pub fn new(base: ArgumentationFramework<A>, values: ValueAssignment<A>) -> Self
Construct from a Dung framework and value assignment.
Sourcepub fn base(&self) -> &ArgumentationFramework<A>
pub fn base(&self) -> &ArgumentationFramework<A>
Borrow the underlying Dung framework (unconditioned attacks).
Sourcepub fn value_assignment(&self) -> &ValueAssignment<A>
pub fn value_assignment(&self) -> &ValueAssignment<A>
Borrow the value assignment.
Sourcepub fn defeat_graph(
&self,
audience: &Audience,
) -> Result<ArgumentationFramework<A>, Error>
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.
Sourcepub fn defeats(&self, attacker: &A, target: &A, audience: &Audience) -> bool
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.
Sourcepub fn accepted_for(&self, audience: &Audience, arg: &A) -> Result<bool, Error>
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.
Sourcepub fn grounded_for(&self, audience: &Audience) -> Result<HashSet<A>, Error>
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).
Sourcepub fn subjectively_accepted(&self, arg: &A) -> Result<bool, Error>
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.
Sourcepub fn objectively_accepted(&self, arg: &A) -> Result<bool, Error>
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.