Skip to main content

normalize_facts_rules_api/
lib.rs

1//! Data types for normalize rule evaluation.
2//!
3//! This crate defines the `Relations` input facts and `Diagnostic` output type used
4//! by the fact rule engine. Rules run as interpreted `.dl` files via
5//! `normalize-facts-rules-interpret`; there is no dynamic library loading.
6//!
7//! # Architecture
8//!
9//! ```text
10//! normalize-facts (extraction) -> Relations (facts) -> Datalog engine -> Diagnostics
11//! ```
12//!
13//! Facts are extracted from code by normalize-facts and passed to the Datalog engine.
14//! Each rule evaluates over these relations and produces Diagnostics.
15
16mod diagnostic;
17mod relations;
18
19pub use diagnostic::{Diagnostic, DiagnosticLevel, Location};
20pub use relations::{
21    AttributeFact, CallFact, ImplementsFact, ImportFact, IsImplFact, ParentFact, QualifierFact,
22    Relations, SymbolFact, SymbolRangeFact, TypeMethodFact, VisibilityFact,
23};
24
25// Re-export ascent for rule implementors
26pub use ascent;