1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//! An easily embeddable, futures-friendly logic engine.
//!
//! If you want to understand more about this implementation, see
//! [How to replace failure by a list of successes](http://dl.acm.org/citation.cfm?id=5280.5288)
//! by Philip Wadler. This code does not follow that paper exactly (since we can encounter errors
//! during resolution), but the general approach is the same.

#![deny(missing_docs)]

#[macro_use]
extern crate failure;
extern crate frunk;
extern crate futures;
#[macro_use]
extern crate lalrpop_util;
#[macro_use]
extern crate lazy_static;
extern crate regex;

mod ast;
pub(crate) mod cst;
mod errors;
mod eval;
mod unify;
pub mod util;

#[cfg(test)]
mod tests;

lalrpop_mod!(grammar);

pub use ast::{Clause, Lit, Rules, Term};
pub use errors::{LoadError, ResolutionError};
pub use eval::Env;
pub use unify::Subst;