pub trait DeonticInferable<D, S, T, ST, SYM, VS, VT>where
D: Datable + Clone,
S: Spatial<VS> + Clone,
T: Temporal<VT> + Clone,
ST: SpaceTemporal<VS, VT> + Clone,
SYM: Symbolic + Clone,
VS: Clone,
VT: Clone,{
// Required method
fn evaluate_action(
&self,
action: &ProposedAction,
context: &Context<D, S, T, ST, SYM, VS, VT>,
tags: &[TeloidTag],
) -> Result<Verdict, DeonticError>;
}Expand description
Defines the public API for a deontic reasoning engine.
Required Methods§
Sourcefn evaluate_action(
&self,
action: &ProposedAction,
context: &Context<D, S, T, ST, SYM, VS, VT>,
tags: &[TeloidTag],
) -> Result<Verdict, DeonticError>
fn evaluate_action( &self, action: &ProposedAction, context: &Context<D, S, T, ST, SYM, VS, VT>, tags: &[TeloidTag], ) -> Result<Verdict, DeonticError>
Evaluates a proposed action against the set of norms within a given context.
§Arguments
action- A reference to theProposedActionbeing evaluated.context- A reference to the currentContextproviding the state of the world.tags- A slice ofTeloidTags used to retrieve relevant norms from the tag index.
§Returns
A Result containing either:
Ok(Verdict)- A richVerdictstruct with the deontic outcome and justification.Err(DeonticError)- An error indicating why the evaluation could not be completed.