Skip to main content

Crate normalize_facts_rules_api

Crate normalize_facts_rules_api 

Source
Expand description

Data types for normalize rule evaluation.

This crate defines the Relations input facts and Diagnostic output type used by the fact rule engine. Rules run as interpreted .dl files via normalize-facts-rules-interpret; there is no dynamic library loading.

§Architecture

normalize-facts (extraction) -> Relations (facts) -> Datalog engine -> Diagnostics

Facts are extracted from code by normalize-facts and passed to the Datalog engine. Each rule evaluates over these relations and produces Diagnostics.

Re-exports§

pub use ascent;

Structs§

AttributeFact
An attribute fact: one attribute annotation on a symbol.
CallFact
A call fact: a function call from one symbol to another.
Diagnostic
A diagnostic produced by a rule.
ImplementsFact
An implements fact: a symbol implements an interface/trait.
ImportFact
An import fact: a dependency from one file to another module.
IsImplFact
An is_impl fact: symbol is a trait/interface implementation.
Location
A source code location.
ParentFact
A parent fact: symbol nesting hierarchy.
QualifierFact
A qualifier fact: call qualifier (receiver/module).
Relations
All relations (facts) available to rules.
SymbolFact
A symbol fact: a named entity defined in a file.
SymbolRangeFact
A symbol range fact: start and end lines of a symbol.
TypeMethodFact
A type method fact: a method signature on a type.
VisibilityFact
A visibility fact: the visibility of a symbol.

Enums§

DiagnosticLevel
Severity level for a diagnostic.