use std::collections::BTreeMap; #[derive(Clone, Debug)] #[allow(dead_code)] pub enum RSprocess<'a> { Nill, ConstantIdentifier{identifier: &'a str}, EntitySet{entities: Vec<&'a str>, next_process: Box>}, WaitEntity{repeat: i64, repeated_process: Box>, next_process: Box>}, NondeterministicChoice{children: Vec>}, Summation{children: Vec>} } #[derive(Clone, Debug)] #[allow(dead_code)] pub struct RSenvironment<'a> { definitions: BTreeMap<&'a str, Box>>, } impl<'a> RSenvironment<'a> { pub fn new() -> RSenvironment<'a> { RSenvironment{definitions: BTreeMap::new()} } } impl<'a, const N: usize> From<[(&'a str, Box>); N]> for RSenvironment<'a> { fn from(arr: [(&'a str, Box>); N]) -> Self { RSenvironment{definitions: BTreeMap::from(arr)} } } impl<'a> From<&[(&'a str, Box>)]> for RSenvironment<'a> { fn from(arr: &[(&'a str, Box>)]) -> Self { RSenvironment{definitions: BTreeMap::from_iter(arr.to_vec())} } } impl<'a> From>)>> for RSenvironment<'a> { fn from(arr: Vec<(&'a str, Box>)>) -> Self { RSenvironment{definitions: BTreeMap::from_iter(arr)} } } #[derive(Clone, Debug)] #[allow(dead_code)] pub enum RSassertOp { InW, InR, InI, InP } #[derive(Clone, Debug)] #[allow(dead_code)] pub enum RSassert<'a> { Not(Box>), Xor(Box>, Box>), Or(Vec>), And(Vec>), Sub(Vec<&'a str>, RSassertOp), NonEmpty(RSassertOp) } #[derive(Clone, Debug)] #[allow(dead_code)] pub enum RSBHML<'a> { True, False, Or(Vec>), And(Vec>), Diamond(Box>, Box>), Box(Box>, Box>) }