1#![warn(missing_docs)]
24
25mod axiom;
26mod entity;
27mod error;
28mod graph;
29mod iri;
30mod limits;
31mod ontology;
32mod reasoner;
33mod serialize;
34
35pub use axiom::{Axiom, AxiomId};
36pub use entity::{EntityId, EntityKind, EntityRecord, EntityRegistry};
37pub use error::{Error, Result};
38pub use graph::{AxiomIndex, AxiomStore};
39pub use iri::{InternPool, IriId};
40pub use limits::Limits;
41pub use ontology::{Ontology, OntologyBuilder};
42pub use reasoner::{Profile, Reasoner, ReasonerBuilder, ReasonerConfig};
43
44#[cfg(test)]
45mod integration_tests {
46 use super::*;
47
48 #[test]
49 fn classify_returns_not_implemented() {
50 let ontology = Ontology::default();
51 let reasoner = Reasoner::builder()
52 .profile(Profile::El)
53 .build(ontology)
54 .expect("build");
55 assert_eq!(reasoner.classify().unwrap_err(), Error::NotImplemented);
56 assert_eq!(reasoner.ontology().entity_count(), 0);
57 }
58
59 #[test]
60 fn reasoner_rejects_invalid_parallelism() {
61 let ontology = Ontology::default();
62 let err = Reasoner::builder()
63 .config(ReasonerConfig {
64 parallelism: 0,
65 ..ReasonerConfig::default()
66 })
67 .build(ontology)
68 .expect_err("parallelism");
69 assert!(matches!(err, Error::Message(_)));
70 }
71}