syndicate-rs/src/skeleton.rs

75 lines
1.5 KiB
Rust
Raw Normal View History

2019-10-15 15:58:34 +00:00
// pub type V = preserves::value::ArcValue;
// type Map<A,B> = std::collections::BTreeMap<A,B>;
// type Set<A> = std::collections::BTreeSet<A>;
// type Bag<A> = super::bag::BTreeBag<A>;
2018-12-09 13:28:01 +00:00
// pub enum Event {
// Removed,
// Message,
// Added,
// }
2018-12-09 13:28:01 +00:00
// type Path = Vec<usize>;
// type Paths = Vec<Path>;
2019-10-15 15:58:34 +00:00
// type Captures = Vec<V>;
2018-12-09 13:28:01 +00:00
// trait HandleEvent {
// fn handle_event<'a>(self, captures: &Captures);
// }
2018-12-09 13:28:01 +00:00
// pub enum Skeleton {
// Blank,
// Guarded(Guard, Vec<Skeleton>)
// }
2018-12-09 13:28:01 +00:00
// pub struct AnalysisResults {
// skeleton: Skeleton,
// const_paths: Paths,
2019-10-15 15:58:34 +00:00
// const_vals: Vec<V>,
// capture_paths: Paths,
2019-10-15 15:58:34 +00:00
// assertion: V,
// }
2018-12-09 13:28:01 +00:00
// pub struct Index {
2019-10-15 15:58:34 +00:00
// all_assertions: Bag<V>,
// }
2018-12-09 13:28:01 +00:00
// impl Index {
// pub fn new() -> Self {
2019-10-15 15:58:34 +00:00
// Index{ all_assertions: Bag::new() }
// }
2018-12-09 13:28:01 +00:00
// // pub fn add_handler(analysis_results: AnalysisResults,
// }
2018-12-09 13:28:01 +00:00
// struct Node {
// continuation: Continuation,
2019-10-15 15:58:34 +00:00
// edges: Map<Selector, Map<Guard, Node>>,
// }
2018-12-09 13:28:01 +00:00
// struct Continuation {
2019-10-15 15:58:34 +00:00
// cached_assertions: Set<V>,
// leaf_map: Map<Paths, Map<Vec<V>, Leaf>>,
// }
2018-12-09 13:28:01 +00:00
// struct Selector {
// pop_count: usize,
// index: usize,
// }
2018-12-09 13:28:01 +00:00
2019-10-15 15:58:34 +00:00
// pub enum Guard {
// Rec(V, usize),
// Seq(usize),
// }
2018-12-09 13:28:01 +00:00
// struct Leaf { // aka Topic
2019-10-15 15:58:34 +00:00
// cached_assertions: Set<V>,
// handler_map: Map<Paths, Handler>,
// }
2018-12-09 13:28:01 +00:00
// struct Handler {
2019-10-15 15:58:34 +00:00
// cached_captures: Bag<Captures>,
// callbacks: Set<Box<dyn HandleEvent>>,
// }