Expand description
This crate provides arithmetic predicates to use with logru.
- The predicates are a poor replacement of CLP/FD, sufficient to use with libobscura.
- Libobscura uses one kind of predicate the most: the range. Itโs used to describe resolutions coming from V4L format enumeration:
-
- range(Width, 8, 640, 4). % Width can take values starting from 8, stepping every 4, and the highest possible value is 640,
-
- This predicate resolves the variable Width and iterates all its possible values (we donโt expect the values from the driver to come close to i64::max, although that would be bad). This is hopefully enough to propagate all possible values through the V4L subdevice pipeline in a reasonable amount of time.
- Basic usage of the resolver from Rust:
use logru_arithmetic::{logru, ArithmeticResolver};
use logru::resolve::ResolverExt;
use logru::search::query_dfs;
use logru::textual::TextualUniverse;
let mut tu = TextualUniverse::new();
let mut arith = ArithmeticResolver::new(&mut tu.symbols);
let resolver = arith.by_ref().or_else(tu.resolver());
let query = tu.prepare_query("eq(1, 1).").unwrap();
let mut results = query_dfs(resolver, query.query());
Re-exportsยง
pub use logru;
Structsยง
- A special resolver for integer arithmetic. It provides special predicates which evaluate integer expressions:
- Range ๐Range inclusive ends.
Enumsยง
- Exp ๐
- Pred ๐
- Variable
Solutions ๐