Skip to main content

lace_sans_io/logic/
mod.rs

1//! Pure Lace logic: Datalog lacegrams, exchange operands/plans, and local
2//! executable policy lowering.
3//!
4//! This crate deliberately has no sockets, runtimes, stores, laces, handles,
5//! or interlace machine state.
6
7pub(crate) mod dependency_graph;
8pub(crate) mod engine;
9mod evaluation;
10pub(crate) mod exchange_plan;
11mod exposure_view;
12mod facet_constraints;
13pub mod lacegram;
14pub(crate) mod limits;
15pub(crate) mod policy;
16pub(crate) mod policy_source;
17pub mod profile;
18pub(crate) mod record_facts;
19pub(crate) mod retention;
20mod text_match;
21pub(crate) mod text_shape;
22pub mod types;
23
24#[cfg_attr(not(feature = "internal"), doc(hidden))]
25pub use engine::base::EvaluationError;
26#[cfg_attr(not(feature = "internal"), doc(hidden))]
27pub use evaluation::{
28    DatalogEvaluation, RuntimeFacts, evaluate_lacegram, evaluate_local_policy,
29    selected_record_hashes,
30};
31pub use exchange_plan::{
32    ExchangePlan, ExchangePlanSlot, LocalExecutablePolicy, blob_resource_hash,
33    canonicalize_lacegram_text, compile_exchange_plan, compile_local_executable_policy,
34    lacegram_resource_hash, lower_exchange_plan_for_local_side,
35};
36pub use facet_constraints::{FieldExclusion, prepare_facet_constraints};
37pub use lacegram::{
38    CanonicalLacegram, canonicalize_lacegram_rules, canonicalize_lacegram_source, parse_lacegram,
39    parse_rule, predicate_variable_kinds, prepare_lacegram_rules, render_rule_line,
40};
41pub use limits::{DatalogLimits, PreparationError};
42pub use policy::{InterlaceModule, all_records, rx_disabled, tx_disabled};
43#[cfg_attr(not(feature = "internal"), doc(hidden))]
44pub use record_facts::{
45    FieldFact, RecordFact, RecordLinkFact, RecordSnapshot, advertisement_facts, fields,
46    record_links, tuples_for_record_all, visit_contained_records, visit_fields, visit_record_links,
47};
48#[cfg_attr(not(feature = "internal"), doc(hidden))]
49pub use text_shape::text_shape_matches;
50
51/// Advertisement field schema required by an agreed exchange plan.
52#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
53pub struct AdvertisementFieldRequirements {
54    pub require_all: bool,
55    pub fields: Vec<String>,
56}
57
58#[cfg_attr(not(feature = "internal"), doc(hidden))]
59pub use types::{
60    BodyAtom, ByValue, Edge, HashText, Lacegram, RelOp, Rule, Symbol, Term, Tuple, Value, Variable,
61    VariableKind,
62};