mod conflict;
mod context;
mod engine;
mod literal;
mod literal_typing;
mod occurrence;
mod occurrence_typing;
mod plan;
mod proposition;
mod seeding;
mod source;
mod target;
mod types;
pub use conflict::{
DatatypeConflict, DatatypeConflictError, DatatypeConflictLimits, DatatypeConflictReport,
DatatypeConflictSink, Rdf12DatatypeConflictChecker,
};
pub use context::{
Rdfs12Context, Rdfs12ContextConfig, Rdfs12ContextError, Rdfs12ContextOutcome,
Rdfs12TargetConfig, Rdfs12TargetReport,
};
pub use engine::Reasoner;
pub use literal::{
LexicalViolation, LiteralError, LiteralInspection, LiteralReader, LiteralReport,
Rdf12LiteralValidator,
};
pub use literal_typing::{
LiteralCursorError, LiteralOccurrence, LiteralOccurrenceCursor, LiteralOccurrenceRead,
LiteralRole, LiteralTermAccess, LiteralTypingError, LiteralTypingLimits, LiteralTypingReport,
Rdf12LiteralOccurrences, Rdf12LiteralTyper,
};
pub use occurrence::{
OccurrenceError, OccurrenceLimits, OccurrencePath, Rdf12OccurrenceCursor, TermOccurrence,
TermPosition,
};
pub use occurrence_typing::{OccurrenceTypingError, OccurrenceTypingReport, Rdf12OccurrenceTyper};
pub use proposition::{PropositionLimits, PropositionReport, Rdf12PropositionConstructor};
pub use seeding::Rdf12AxiomSeeder;
pub use source::{
Rdf12ContainerAccess, Rdf12SourceDiagnostic, Rdf12SourceDiagnosticSink, Rdfs12Source,
Rdfs12SourceConfig, Rdfs12SourceError, Rdfs12SourceOutcome, Rdfs12SourceReport,
SourceLiteralLimits,
};
pub use target::{
Rdf12TargetConstructor, TargetConstructionError, TargetConstructionLimits,
TargetConstructionReport,
};
pub use types::{
AxiomFamily, Evidence, ExecutionProfile, Inference, Limit, Premises, ProfileError,
ReasoningError, RunLimits, RunReport,
};
use std::{error::Error, future::Future};
pub trait TripleCursor: Send {
type Term: Clone + Eq + Send + Sync;
type Error: Error + Send + Sync + 'static;
fn next(&mut self)
-> impl Future<Output = Result<Option<[Self::Term; 3]>, Self::Error>> + Send;
}
pub trait TripleSource: Send + Sync {
type Term: Clone + Eq + Send + Sync;
type Error: Error + Send + Sync + 'static;
type Cursor: TripleCursor<Term = Self::Term, Error = Self::Error>;
fn scan(
&self,
pattern: [Option<Self::Term>; 3],
) -> impl Future<Output = Result<Self::Cursor, Self::Error>> + Send;
}
pub trait ReasoningStore: Send {
type Term: Clone + Eq + Send + Sync;
type Error: Error + Send + Sync + 'static;
type Snapshot: TripleSource<Term = Self::Term, Error = Self::Error>;
fn resolve_iri(
&mut self,
iri: &str,
) -> impl Future<Output = Result<Self::Term, Self::Error>> + Send;
fn snapshot(&mut self) -> impl Future<Output = Result<Self::Snapshot, Self::Error>> + Send;
fn contains(
&mut self,
triple: &[Self::Term; 3],
) -> impl Future<Output = Result<bool, Self::Error>> + Send;
fn insert_inferred(
&mut self,
inference: Inference<Self::Term>,
) -> impl Future<Output = Result<bool, Self::Error>> + Send;
fn is_cancelled(&self) -> bool;
}
pub trait Rdf12WitnessStore: ReasoningStore {
fn resolve_existential_blank(
&mut self,
id: rdf_reasoning::Rdf12ExistentialAxiomId,
) -> impl Future<Output = Result<Self::Term, Self::Error>> + Send;
}
pub trait Rdf12TripleTermStore: ReasoningStore {
fn resolve_triple_term(
&mut self,
triple: [Self::Term; 3],
) -> impl Future<Output = Result<Self::Term, Self::Error>> + Send;
}