Relocate all files into separate module
This commit is contained in:
@ -1,6 +1,10 @@
|
|||||||
// If changing IntegerType in assert.rs, also change from Num to another
|
use std::collections::HashMap;
|
||||||
// similar parser with different return type in grammar.lalrpop in
|
|
||||||
// AssertExpression
|
use super::super::{structure, translator, graph};
|
||||||
|
|
||||||
|
/// If changing IntegerType in assert.rs, also change from Num to another
|
||||||
|
/// similar parser with different return type in grammar.lalrpop in
|
||||||
|
/// AssertExpression
|
||||||
type IntegerType = i64;
|
type IntegerType = i64;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
@ -24,16 +28,15 @@ pub enum Variable<S> {
|
|||||||
Special(S)
|
Special(S)
|
||||||
}
|
}
|
||||||
|
|
||||||
trait SpecialVariables<G>: Display + std::fmt::Debug + Sized + Eq + Copy
|
/// Trait needed for special variables.
|
||||||
+ std::hash::Hash
|
trait SpecialVariables<G>: std::fmt::Display + std::fmt::Debug + Sized + Eq
|
||||||
|
+ Copy + std::hash::Hash
|
||||||
{
|
{
|
||||||
fn type_of(&self) -> AssertionTypes;
|
fn type_of(&self) -> AssertionTypes;
|
||||||
fn type_qualified(&self, q: &Qualifier) -> Result<AssertionTypes, String>;
|
fn type_qualified(&self, q: &Qualifier) -> Result<AssertionTypes, String>;
|
||||||
fn new_context(input: HashMap<Self, G>)
|
fn new_context(input: HashMap<Self, G>)
|
||||||
-> HashMap<Self, AssertReturnValue>;
|
-> HashMap<Self, AssertReturnValue>;
|
||||||
fn correct_type(&self, other: &AssertReturnValue) -> bool;
|
fn correct_type(&self, other: &AssertReturnValue) -> bool;
|
||||||
// fn correct_type_qualified(&self, q: &Qualifier, other: &AssertReturnValue)
|
|
||||||
// -> bool;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
@ -41,9 +44,9 @@ pub enum Expression<S> {
|
|||||||
True,
|
True,
|
||||||
False,
|
False,
|
||||||
Integer(IntegerType),
|
Integer(IntegerType),
|
||||||
Label(Box<super::structure::RSlabel>),
|
Label(Box<structure::RSlabel>),
|
||||||
Set(super::structure::RSset),
|
Set(structure::RSset),
|
||||||
Element(super::translator::IdType),
|
Element(translator::IdType),
|
||||||
String(String),
|
String(String),
|
||||||
Var(Variable<S>),
|
Var(Variable<S>),
|
||||||
|
|
||||||
@ -153,35 +156,16 @@ pub enum AssertReturnValue {
|
|||||||
Boolean(bool),
|
Boolean(bool),
|
||||||
Integer(IntegerType),
|
Integer(IntegerType),
|
||||||
String(String),
|
String(String),
|
||||||
Label(super::structure::RSlabel),
|
Label(structure::RSlabel),
|
||||||
Set(super::structure::RSset),
|
Set(structure::RSset),
|
||||||
Element(super::translator::IdType),
|
Element(translator::IdType),
|
||||||
Node(petgraph::graph::NodeIndex),
|
Node(petgraph::graph::NodeIndex),
|
||||||
Edge(petgraph::graph::EdgeIndex),
|
Edge(petgraph::graph::EdgeIndex),
|
||||||
Neighbours(petgraph::graph::NodeIndex),
|
Neighbours(petgraph::graph::NodeIndex),
|
||||||
System(super::structure::RSsystem),
|
System(structure::RSsystem),
|
||||||
Context(super::structure::RSprocess),
|
Context(structure::RSprocess),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AssertReturnValue {
|
|
||||||
pub fn assign_qualified(&mut self, q: Qualifier, val: AssertReturnValue)
|
|
||||||
-> Result<(), String> {
|
|
||||||
match (self, q, val) {
|
|
||||||
(Self::Label(l),
|
|
||||||
Qualifier::Restricted(q),
|
|
||||||
AssertReturnValue::Set(set)) => {
|
|
||||||
*q.referenced_mut(l) = set;
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
(s, q, val) => {
|
|
||||||
Err(format!("Cannot assign {val} to {s} with qualifier {q}"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Implementations for types
|
// Implementations for types
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@ -189,8 +173,8 @@ impl AssertReturnValue {
|
|||||||
impl QualifierRestricted {
|
impl QualifierRestricted {
|
||||||
pub(super) fn referenced_mut<'a>(
|
pub(super) fn referenced_mut<'a>(
|
||||||
&self,
|
&self,
|
||||||
label: &'a mut super::structure::RSlabel,
|
label: &'a mut structure::RSlabel,
|
||||||
) -> &'a mut super::structure::RSset {
|
) -> &'a mut structure::RSset {
|
||||||
match self {
|
match self {
|
||||||
Self::Entities => {&mut label.available_entities},
|
Self::Entities => {&mut label.available_entities},
|
||||||
Self::Context => {&mut label.context},
|
Self::Context => {&mut label.context},
|
||||||
@ -204,8 +188,8 @@ impl QualifierRestricted {
|
|||||||
|
|
||||||
pub(super) fn referenced<'a>(
|
pub(super) fn referenced<'a>(
|
||||||
&self,
|
&self,
|
||||||
label: &'a super::structure::RSlabel,
|
label: &'a structure::RSlabel,
|
||||||
) -> &'a super::structure::RSset {
|
) -> &'a structure::RSset {
|
||||||
match self {
|
match self {
|
||||||
Self::Entities => {&label.available_entities},
|
Self::Entities => {&label.available_entities},
|
||||||
Self::Context => {&label.context},
|
Self::Context => {&label.context},
|
||||||
@ -219,7 +203,7 @@ impl QualifierRestricted {
|
|||||||
|
|
||||||
pub(super) fn get(
|
pub(super) fn get(
|
||||||
&self,
|
&self,
|
||||||
label: &super::structure::RSlabel,
|
label: &structure::RSlabel,
|
||||||
) -> AssertReturnValue {
|
) -> AssertReturnValue {
|
||||||
AssertReturnValue::Set(self.referenced(label).clone())
|
AssertReturnValue::Set(self.referenced(label).clone())
|
||||||
}
|
}
|
||||||
@ -228,7 +212,7 @@ impl QualifierRestricted {
|
|||||||
impl QualifierLabel {
|
impl QualifierLabel {
|
||||||
pub(super) fn get(
|
pub(super) fn get(
|
||||||
&self,
|
&self,
|
||||||
l: &super::structure::RSlabel,
|
l: &structure::RSlabel,
|
||||||
) -> AssertReturnValue {
|
) -> AssertReturnValue {
|
||||||
match self {
|
match self {
|
||||||
QualifierLabel::AvailableEntities => {
|
QualifierLabel::AvailableEntities => {
|
||||||
@ -248,7 +232,7 @@ impl QualifierLabel {
|
|||||||
impl QualifierSystem {
|
impl QualifierSystem {
|
||||||
pub(super) fn get(
|
pub(super) fn get(
|
||||||
&self,
|
&self,
|
||||||
l: &super::structure::RSsystem,
|
l: &structure::RSsystem,
|
||||||
) -> AssertReturnValue {
|
) -> AssertReturnValue {
|
||||||
match self {
|
match self {
|
||||||
Self::Context => {
|
Self::Context => {
|
||||||
@ -484,13 +468,28 @@ impl Binary {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl AssertReturnValue {
|
||||||
|
pub fn assign_qualified(&mut self, q: Qualifier, val: AssertReturnValue)
|
||||||
|
-> Result<(), String> {
|
||||||
|
match (self, q, val) {
|
||||||
|
(Self::Label(l),
|
||||||
|
Qualifier::Restricted(q),
|
||||||
|
AssertReturnValue::Set(set)) => {
|
||||||
|
*q.referenced_mut(l) = set;
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
|
(s, q, val) => {
|
||||||
|
Err(format!("Cannot assign {val} to {s} with qualifier {q}"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
use std::collections::HashMap;
|
// Typechecking and Evaluation
|
||||||
use std::fmt::{self, Display};
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
use petgraph::visit::EdgeRef;
|
|
||||||
|
|
||||||
struct TypeContext {
|
struct TypeContext {
|
||||||
data: HashMap<String, AssertionTypes>,
|
data: HashMap<String, AssertionTypes>,
|
||||||
@ -728,8 +727,8 @@ impl AssertReturnValue {
|
|||||||
fn unary(
|
fn unary(
|
||||||
self,
|
self,
|
||||||
u: &Unary,
|
u: &Unary,
|
||||||
translator: &mut super::translator::Translator,
|
translator: &mut translator::Translator,
|
||||||
graph: &super::graph::RSgraph,
|
graph: &graph::RSgraph,
|
||||||
) -> Result<AssertReturnValue, String> {
|
) -> Result<AssertReturnValue, String> {
|
||||||
match (self, u) {
|
match (self, u) {
|
||||||
(AssertReturnValue::Boolean(b), Unary::Not) => {
|
(AssertReturnValue::Boolean(b), Unary::Not) => {
|
||||||
@ -804,7 +803,7 @@ impl AssertReturnValue {
|
|||||||
self,
|
self,
|
||||||
b: &Binary,
|
b: &Binary,
|
||||||
other: AssertReturnValue,
|
other: AssertReturnValue,
|
||||||
_translator: &mut super::translator::Translator
|
_translator: &mut translator::Translator
|
||||||
) -> Result<AssertReturnValue, String> {
|
) -> Result<AssertReturnValue, String> {
|
||||||
use AssertReturnValue::*;
|
use AssertReturnValue::*;
|
||||||
Ok(match (b, self, other) {
|
Ok(match (b, self, other) {
|
||||||
@ -1002,8 +1001,8 @@ where S: SpecialVariables<G> {
|
|||||||
fn execute<S, G>(
|
fn execute<S, G>(
|
||||||
tree: &Tree<S>,
|
tree: &Tree<S>,
|
||||||
c: &mut Context<S>,
|
c: &mut Context<S>,
|
||||||
translator: &mut super::translator::Translator,
|
translator: &mut translator::Translator,
|
||||||
graph: &super::graph::RSgraph,
|
graph: &graph::RSgraph,
|
||||||
) -> Result<Option<AssertReturnValue>, String>
|
) -> Result<Option<AssertReturnValue>, String>
|
||||||
where S: SpecialVariables<G> {
|
where S: SpecialVariables<G> {
|
||||||
match tree {
|
match tree {
|
||||||
@ -1056,10 +1055,12 @@ type RangeIterator = std::vec::IntoIter<AssertReturnValue>;
|
|||||||
fn range_into_iter<S, G>(
|
fn range_into_iter<S, G>(
|
||||||
range: &Range<S>,
|
range: &Range<S>,
|
||||||
c: &mut Context<S>,
|
c: &mut Context<S>,
|
||||||
translator: &mut super::translator::Translator,
|
translator: &mut translator::Translator,
|
||||||
graph: &super::graph::RSgraph,
|
graph: &graph::RSgraph,
|
||||||
) -> Result<RangeIterator, String>
|
) -> Result<RangeIterator, String>
|
||||||
where S: SpecialVariables<G> {
|
where S: SpecialVariables<G> {
|
||||||
|
use petgraph::visit::EdgeRef;
|
||||||
|
|
||||||
match range {
|
match range {
|
||||||
Range::IterateOverSet(exp) => {
|
Range::IterateOverSet(exp) => {
|
||||||
let val = execute_exp(exp, c, translator, graph)?;
|
let val = execute_exp(exp, c, translator, graph)?;
|
||||||
@ -1100,8 +1101,8 @@ where S: SpecialVariables<G> {
|
|||||||
fn execute_exp<S, G>(
|
fn execute_exp<S, G>(
|
||||||
exp: &Expression<S>,
|
exp: &Expression<S>,
|
||||||
c: &Context<S>,
|
c: &Context<S>,
|
||||||
translator: &mut super::translator::Translator,
|
translator: &mut translator::Translator,
|
||||||
graph: &super::graph::RSgraph,
|
graph: &graph::RSgraph,
|
||||||
) -> Result<AssertReturnValue, String>
|
) -> Result<AssertReturnValue, String>
|
||||||
where S: SpecialVariables<G> {
|
where S: SpecialVariables<G> {
|
||||||
match exp {
|
match exp {
|
||||||
@ -1143,7 +1144,7 @@ pub enum EdgeRelablerInput {
|
|||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum EdgeRelablerInputValues {
|
pub enum EdgeRelablerInputValues {
|
||||||
Label(super::structure::RSlabel),
|
Label(structure::RSlabel),
|
||||||
Edge(petgraph::graph::EdgeIndex),
|
Edge(petgraph::graph::EdgeIndex),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1184,20 +1185,10 @@ impl SpecialVariables<EdgeRelablerInputValues> for EdgeRelablerInput {
|
|||||||
(_, _) => false
|
(_, _) => false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fn correct_type_qualified(&self, q: &Qualifier, other: &AssertReturnValue)
|
|
||||||
// -> bool {
|
|
||||||
// match (self, q, other) {
|
|
||||||
// (Self::Label, Qualifier::Label(_), AssertReturnValue::Set(_)) |
|
|
||||||
// (Self::Label, Qualifier::Restricted(_), AssertReturnValue::Set(_))
|
|
||||||
// => true,
|
|
||||||
// (_, _, _) => false
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Display for EdgeRelablerInput {
|
impl std::fmt::Display for EdgeRelablerInput {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::Label => write!(f, "label"),
|
Self::Label => write!(f, "label"),
|
||||||
Self::Edge => write!(f, "edge"),
|
Self::Edge => write!(f, "edge"),
|
||||||
@ -1206,9 +1197,6 @@ impl Display for EdgeRelablerInput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
impl RSassert<EdgeRelablerInput> {
|
impl RSassert<EdgeRelablerInput> {
|
||||||
pub fn typecheck(&self) -> Result<(), String> {
|
pub fn typecheck(&self) -> Result<(), String> {
|
||||||
let mut context = TypeContext::new();
|
let mut context = TypeContext::new();
|
||||||
@ -1236,9 +1224,9 @@ impl RSassert<EdgeRelablerInput> {
|
|||||||
|
|
||||||
pub fn execute(
|
pub fn execute(
|
||||||
&self,
|
&self,
|
||||||
graph: &super::graph::RSgraph,
|
graph: &graph::RSgraph,
|
||||||
edge: &<super::graph::RSgraph as petgraph::visit::GraphBase>::EdgeId,
|
edge: &<graph::RSgraph as petgraph::visit::GraphBase>::EdgeId,
|
||||||
translator: &mut super::translator::Translator,
|
translator: &mut translator::Translator,
|
||||||
) -> Result<AssertReturnValue, String> {
|
) -> Result<AssertReturnValue, String> {
|
||||||
let label = graph.edge_weight(*edge).unwrap();
|
let label = graph.edge_weight(*edge).unwrap();
|
||||||
|
|
||||||
@ -1257,6 +1245,4 @@ impl RSassert<EdgeRelablerInput> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include!("assert_fmt.rs");
|
include!("fmt.rs");
|
||||||
|
|
||||||
include!("assert_tests.rs");
|
|
||||||
@ -1,14 +1,15 @@
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Display Implementation for all types
|
// Display Implementation for all types
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
use std::fmt;
|
||||||
|
|
||||||
impl<S> fmt::Display for RSassert<S> where S: Display {
|
impl<S> fmt::Display for RSassert<S> where S: fmt::Display {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
write!(f, "label {{\n{}\n}}", self.tree)
|
write!(f, "label {{\n{}\n}}", self.tree)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> fmt::Display for Tree<S> where S: Display {
|
impl<S> fmt::Display for Tree<S> where S: fmt::Display {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::Concat(t1, t2) => {write!(f, "{t1};\n{t2}")},
|
Self::Concat(t1, t2) => {write!(f, "{t1};\n{t2}")},
|
||||||
@ -29,7 +30,7 @@ impl<S> fmt::Display for Tree<S> where S: Display {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> fmt::Display for Variable<S> where S: Display {
|
impl<S> fmt::Display for Variable<S> where S: fmt::Display {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::Special(s) => {write!(f, "{s}")},
|
Self::Special(s) => {write!(f, "{s}")},
|
||||||
@ -38,7 +39,7 @@ impl<S> fmt::Display for Variable<S> where S: Display {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> fmt::Display for Expression<S> where S: Display {
|
impl<S> fmt::Display for Expression<S> where S: fmt::Display {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::True => {write!(f, "True")},
|
Self::True => {write!(f, "True")},
|
||||||
@ -73,7 +74,7 @@ impl<S> fmt::Display for Expression<S> where S: Display {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> fmt::Display for Range<S> where S: Display {
|
impl<S> fmt::Display for Range<S> where S: fmt::Display {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::IterateOverSet(exp) => {write!(f, "{{{exp}}}")},
|
Self::IterateOverSet(exp) => {write!(f, "{{{exp}}}")},
|
||||||
4
src/rsprocess/assert/mod.rs
Normal file
4
src/rsprocess/assert/mod.rs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
pub mod dsl;
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests;
|
||||||
@ -2,30 +2,33 @@
|
|||||||
// Testing
|
// Testing
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
use super::dsl::*;
|
||||||
|
use super::super::{translator, structure};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_true() {
|
fn assert_tycheck_true() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {tree: Tree::Return(Box::new(Expression::True))};
|
let tree = RSassert {tree: Tree::Return(Box::new(Expression::True))};
|
||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_concat_1() {
|
fn assert_tycheck_concat_1() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -39,21 +42,21 @@ fn assert_tycheck_concat_1() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_concat_2() {
|
fn assert_tycheck_concat_2() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -67,21 +70,21 @@ fn assert_tycheck_concat_2() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_return_1() {
|
fn assert_tycheck_return_1() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -92,14 +95,14 @@ fn assert_tycheck_return_1() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,8 +139,8 @@ fn assert_tycheck_return_incompatible_2() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_return_2() {
|
fn assert_tycheck_return_2() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -157,22 +160,22 @@ fn assert_tycheck_return_2() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_return_3() {
|
fn assert_tycheck_return_3() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -192,21 +195,21 @@ fn assert_tycheck_return_3() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(false))));
|
Ok(AssertReturnValue::Boolean(false))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_if_1() {
|
fn assert_tycheck_if_1() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -228,21 +231,21 @@ fn assert_tycheck_if_1() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_if_2() {
|
fn assert_tycheck_if_2() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -263,21 +266,21 @@ fn assert_tycheck_if_2() {
|
|||||||
};
|
};
|
||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(false))));
|
Ok(AssertReturnValue::Boolean(false))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_if_3() {
|
fn assert_tycheck_if_3() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -299,14 +302,14 @@ fn assert_tycheck_if_3() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,8 +337,8 @@ fn assert_tycheck_if_4() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_if_else_1() {
|
fn assert_tycheck_if_else_1() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -360,21 +363,21 @@ fn assert_tycheck_if_else_1() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_if_else_2() {
|
fn assert_tycheck_if_else_2() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -399,14 +402,14 @@ fn assert_tycheck_if_else_2() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(false))));
|
Ok(AssertReturnValue::Boolean(false))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,8 +477,8 @@ fn assert_tycheck_assignment_1() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_assignment_2() {
|
fn assert_tycheck_assignment_2() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -498,21 +501,21 @@ fn assert_tycheck_assignment_2() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_assignment_3() {
|
fn assert_tycheck_assignment_3() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -537,14 +540,14 @@ fn assert_tycheck_assignment_3() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(false))));
|
Ok(AssertReturnValue::Boolean(false))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -575,8 +578,8 @@ fn assert_tycheck_assignment_4() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_assignment_5() {
|
fn assert_tycheck_assignment_5() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -602,21 +605,21 @@ fn assert_tycheck_assignment_5() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(10))));
|
Ok(AssertReturnValue::Integer(10))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_assignment_6() {
|
fn assert_tycheck_assignment_6() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -649,21 +652,21 @@ fn assert_tycheck_assignment_6() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(10))));
|
Ok(AssertReturnValue::Integer(10))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_assignment_7() {
|
fn assert_tycheck_assignment_7() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -694,21 +697,21 @@ fn assert_tycheck_assignment_7() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_assignment_8() {
|
fn assert_tycheck_assignment_8() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -743,21 +746,21 @@ fn assert_tycheck_assignment_8() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(10))));
|
Ok(AssertReturnValue::Integer(10))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_assignment_9() {
|
fn assert_tycheck_assignment_9() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -790,21 +793,21 @@ fn assert_tycheck_assignment_9() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(10))));
|
Ok(AssertReturnValue::Integer(10))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_assignment_10() {
|
fn assert_tycheck_assignment_10() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -839,22 +842,22 @@ fn assert_tycheck_assignment_10() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(10))));
|
Ok(AssertReturnValue::Integer(10))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_for_1() {
|
fn assert_tycheck_for_1() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel, RSset};
|
use structure::{RSsystem, RSlabel, RSset};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -888,21 +891,21 @@ fn assert_tycheck_for_1() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(tree.execute(&graph, &edge, &mut translator).is_err());
|
assert!(tree.execute(&graph, &edge, &mut tr).is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_for_2() {
|
fn assert_tycheck_for_2() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel, RSset};
|
use structure::{RSsystem, RSlabel, RSset};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -938,23 +941,23 @@ fn assert_tycheck_for_2() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
translator.encode("one");
|
tr.encode("one");
|
||||||
translator.encode("two");
|
tr.encode("two");
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Set(_))));
|
Ok(AssertReturnValue::Set(_))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_for_3() {
|
fn assert_tycheck_for_3() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel, RSset};
|
use structure::{RSsystem, RSlabel, RSset};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -1004,23 +1007,23 @@ fn assert_tycheck_for_3() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
translator.encode("one");
|
tr.encode("one");
|
||||||
translator.encode("two");
|
tr.encode("two");
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Set(_))));
|
Ok(AssertReturnValue::Set(_))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_for_4() {
|
fn assert_tycheck_for_4() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel, RSset};
|
use structure::{RSsystem, RSlabel, RSset};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -1070,24 +1073,24 @@ fn assert_tycheck_for_4() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
translator.encode("one");
|
tr.encode("one");
|
||||||
translator.encode("two");
|
tr.encode("two");
|
||||||
translator.encode("three");
|
tr.encode("three");
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Element(_))));
|
Ok(AssertReturnValue::Element(_))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_for_5() {
|
fn assert_tycheck_for_5() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel, RSset};
|
use structure::{RSsystem, RSlabel, RSset};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -1150,24 +1153,24 @@ fn assert_tycheck_for_5() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
translator.encode("one");
|
tr.encode("one");
|
||||||
translator.encode("two");
|
tr.encode("two");
|
||||||
translator.encode("three");
|
tr.encode("three");
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(3))));
|
Ok(AssertReturnValue::Integer(3))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_for_6() {
|
fn assert_tycheck_for_6() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel, RSset};
|
use structure::{RSsystem, RSlabel, RSset};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -1240,10 +1243,10 @@ fn assert_tycheck_for_6() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
translator.encode("one");
|
tr.encode("one");
|
||||||
translator.encode("two");
|
tr.encode("two");
|
||||||
translator.encode("three");
|
tr.encode("three");
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
@ -1251,14 +1254,14 @@ fn assert_tycheck_for_6() {
|
|||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(2))));
|
Ok(AssertReturnValue::Integer(2))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_for_7() {
|
fn assert_tycheck_for_7() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -1295,7 +1298,7 @@ fn assert_tycheck_for_7() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
@ -1303,14 +1306,14 @@ fn assert_tycheck_for_7() {
|
|||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(0))));
|
Ok(AssertReturnValue::Integer(0))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_for_8() {
|
fn assert_tycheck_for_8() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel};
|
use structure::{RSsystem, RSlabel};
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
tree: Tree::Concat(
|
tree: Tree::Concat(
|
||||||
@ -1361,18 +1364,18 @@ fn assert_tycheck_for_8() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
let node_2 = graph.add_node(RSsystem::new());
|
let node_2 = graph.add_node(RSsystem::new());
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(1))));
|
Ok(AssertReturnValue::Integer(1))));
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
@ -1381,14 +1384,14 @@ fn assert_tycheck_for_8() {
|
|||||||
let node_3 = graph.add_node(RSsystem::new());
|
let node_3 = graph.add_node(RSsystem::new());
|
||||||
graph.add_edge(node_1, node_3, RSlabel::new());
|
graph.add_edge(node_1, node_3, RSlabel::new());
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Integer(2))));
|
Ok(AssertReturnValue::Integer(2))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn assert_tycheck_system() {
|
fn assert_tycheck_system() {
|
||||||
use super::translator::Translator;
|
use translator::Translator;
|
||||||
use super::structure::{RSsystem, RSlabel, RSset, RSenvironment, RSprocess};
|
use structure::{RSsystem, RSlabel, RSset, RSenvironment, RSprocess};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
let tree = RSassert {
|
let tree = RSassert {
|
||||||
@ -1425,7 +1428,7 @@ fn assert_tycheck_system() {
|
|||||||
assert!(tree.typecheck().is_ok());
|
assert!(tree.typecheck().is_ok());
|
||||||
|
|
||||||
|
|
||||||
let mut translator = Translator::new();
|
let mut tr = Translator::new();
|
||||||
|
|
||||||
let mut graph = petgraph::Graph::new();
|
let mut graph = petgraph::Graph::new();
|
||||||
let node_1 = graph.add_node(RSsystem::new());
|
let node_1 = graph.add_node(RSsystem::new());
|
||||||
@ -1439,8 +1442,8 @@ fn assert_tycheck_system() {
|
|||||||
);
|
);
|
||||||
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
let edge = graph.add_edge(node_1, node_2, RSlabel::new());
|
||||||
|
|
||||||
println!("{:?}", tree.execute(&graph, &edge, &mut translator));
|
println!("{:?}", tree.execute(&graph, &edge, &mut tr));
|
||||||
|
|
||||||
assert!(matches!(tree.execute(&graph, &edge, &mut translator),
|
assert!(matches!(tree.execute(&graph, &edge, &mut tr),
|
||||||
Ok(AssertReturnValue::Boolean(true))));
|
Ok(AssertReturnValue::Boolean(true))));
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ where
|
|||||||
&self,
|
&self,
|
||||||
edge_map: &super::structure::RSassert,
|
edge_map: &super::structure::RSassert,
|
||||||
translator: &mut super::translator::Translator
|
translator: &mut super::translator::Translator
|
||||||
) -> Result<Graph<RSsystem, super::assert::AssertReturnValue, Ty, Ix>, String>;
|
) -> Result<Graph<RSsystem, super::structure::assert::AssertReturnValue, Ty, Ix>, String>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> MapEdges<'a, RSsystem, RSlabel, Directed, u32>
|
impl<'a> MapEdges<'a, RSsystem, RSlabel, Directed, u32>
|
||||||
@ -140,7 +140,7 @@ impl<'a> MapEdges<'a, RSsystem, RSlabel, Directed, u32>
|
|||||||
&self,
|
&self,
|
||||||
edge_map: &super::structure::RSassert,
|
edge_map: &super::structure::RSassert,
|
||||||
translator: &mut super::translator::Translator
|
translator: &mut super::translator::Translator
|
||||||
)-> Result<Graph<RSsystem, super::assert::AssertReturnValue, Directed, u32>, String> {
|
)-> Result<Graph<RSsystem, super::structure::assert::AssertReturnValue, Directed, u32>, String> {
|
||||||
use petgraph::graph::EdgeIndex;
|
use petgraph::graph::EdgeIndex;
|
||||||
|
|
||||||
let mut g = Graph::with_capacity(self.node_count(), self.edge_count());
|
let mut g = Graph::with_capacity(self.node_count(), self.edge_count());
|
||||||
|
|||||||
@ -503,7 +503,7 @@ pub fn bisimilar(
|
|||||||
system_b: String
|
system_b: String
|
||||||
) -> Result<String, String>
|
) -> Result<String, String>
|
||||||
{
|
{
|
||||||
use super::assert::AssertReturnValue;
|
use super::structure::assert::AssertReturnValue;
|
||||||
|
|
||||||
let system_b = read_file(system_a.get_translator(),
|
let system_b = read_file(system_a.get_translator(),
|
||||||
system_b.to_string(),
|
system_b.to_string(),
|
||||||
|
|||||||
@ -620,11 +620,11 @@ impl Hash for RSlabel {
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
pub type RSassert =
|
pub type RSassert =
|
||||||
crate::rsprocess::assert::RSassert<
|
crate::rsprocess::assert::dsl::RSassert<
|
||||||
crate::rsprocess::assert::EdgeRelablerInput>;
|
crate::rsprocess::assert::dsl::EdgeRelablerInput>;
|
||||||
|
|
||||||
pub mod assert {
|
pub mod assert {
|
||||||
pub use crate::rsprocess::assert::*;
|
pub use crate::rsprocess::assert::dsl::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user