Fiddle with skeleton.rs
This commit is contained in:
parent
1dcbb1ef05
commit
4399f17db4
|
@ -1,7 +1,8 @@
|
||||||
// use std::collections::BTreeMap;
|
// pub type V = preserves::value::ArcValue;
|
||||||
// use std::collections::BTreeSet;
|
|
||||||
// use super::bag::BTreeBag;
|
// type Map<A,B> = std::collections::BTreeMap<A,B>;
|
||||||
// use preserves::value::AValue;
|
// type Set<A> = std::collections::BTreeSet<A>;
|
||||||
|
// type Bag<A> = super::bag::BTreeBag<A>;
|
||||||
|
|
||||||
// pub enum Event {
|
// pub enum Event {
|
||||||
// Removed,
|
// Removed,
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
|
|
||||||
// type Path = Vec<usize>;
|
// type Path = Vec<usize>;
|
||||||
// type Paths = Vec<Path>;
|
// type Paths = Vec<Path>;
|
||||||
// type Captures = Vec<AValue>;
|
// type Captures = Vec<V>;
|
||||||
|
|
||||||
// trait HandleEvent {
|
// trait HandleEvent {
|
||||||
// fn handle_event<'a>(self, captures: &Captures);
|
// fn handle_event<'a>(self, captures: &Captures);
|
||||||
|
@ -25,18 +26,18 @@
|
||||||
// pub struct AnalysisResults {
|
// pub struct AnalysisResults {
|
||||||
// skeleton: Skeleton,
|
// skeleton: Skeleton,
|
||||||
// const_paths: Paths,
|
// const_paths: Paths,
|
||||||
// const_vals: Vec<AValue>,
|
// const_vals: Vec<V>,
|
||||||
// capture_paths: Paths,
|
// capture_paths: Paths,
|
||||||
// assertion: AValue,
|
// assertion: V,
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// pub struct Index {
|
// pub struct Index {
|
||||||
// all_assertions: BTreeBag<AValue>,
|
// all_assertions: Bag<V>,
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// impl Index {
|
// impl Index {
|
||||||
// pub fn new() -> Self {
|
// pub fn new() -> Self {
|
||||||
// Index{ all_assertions: BTreeBag::new() }
|
// Index{ all_assertions: Bag::new() }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// // pub fn add_handler(analysis_results: AnalysisResults,
|
// // pub fn add_handler(analysis_results: AnalysisResults,
|
||||||
|
@ -44,12 +45,12 @@
|
||||||
|
|
||||||
// struct Node {
|
// struct Node {
|
||||||
// continuation: Continuation,
|
// continuation: Continuation,
|
||||||
// edges: BTreeMap<Selector, BTreeMap<Guard, Node>>,
|
// edges: Map<Selector, Map<Guard, Node>>,
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// struct Continuation {
|
// struct Continuation {
|
||||||
// cached_assertions: BTreeSet<AValue>,
|
// cached_assertions: Set<V>,
|
||||||
// leaf_map: BTreeMap<Paths, BTreeMap<Vec<AValue>, Leaf>>,
|
// leaf_map: Map<Paths, Map<Vec<V>, Leaf>>,
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// struct Selector {
|
// struct Selector {
|
||||||
|
@ -57,17 +58,17 @@
|
||||||
// index: usize,
|
// index: usize,
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// enum Guard {
|
// pub enum Guard {
|
||||||
// Rec(AValue, usize),
|
// Rec(V, usize),
|
||||||
// Seq(usize),
|
// Seq(usize),
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// struct Leaf { // aka Topic
|
// struct Leaf { // aka Topic
|
||||||
// cached_assertions: BTreeSet<AValue>,
|
// cached_assertions: Set<V>,
|
||||||
// handler_map: BTreeMap<Paths, Handler>,
|
// handler_map: Map<Paths, Handler>,
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// struct Handler {
|
// struct Handler {
|
||||||
// cached_captures: BTreeBag<Captures>,
|
// cached_captures: Bag<Captures>,
|
||||||
// callbacks: BTreeSet<Box<dyn HandleEvent>>,
|
// callbacks: Set<Box<dyn HandleEvent>>,
|
||||||
// }
|
// }
|
||||||
|
|
Loading…
Reference in New Issue