Assert edges, source and target nodes, tests
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -49,8 +49,8 @@ match {
|
|||||||
"UncommonEntitiesDeleted", "UncommonMaskEntitiesDeleted",
|
"UncommonEntitiesDeleted", "UncommonMaskEntitiesDeleted",
|
||||||
"EntitiesAdded", "MaskEntitiesAdded",
|
"EntitiesAdded", "MaskEntitiesAdded",
|
||||||
"UncommonEntitiesAdded", "UncommonMaskEntitiesAdded",
|
"UncommonEntitiesAdded", "UncommonMaskEntitiesAdded",
|
||||||
"label", "if", "then", "else", "let", "=", "return", "for", "in",
|
"label", "edge", "if", "then", "else", "let", "=", "return", "for", "in",
|
||||||
"not", "rand", ".empty", ".length", ".tostr",
|
"not", "rand", ".empty", ".length", ".tostr", ".source", ".target",
|
||||||
"&&", "||", "^^", "<=", ">=", "==", "!=", "+", "*", "/", "%",
|
"&&", "||", "^^", "<=", ">=", "==", "!=", "+", "*", "/", "%",
|
||||||
"::", "substr", "min", "max", "commonsubstr",
|
"::", "substr", "min", "max", "commonsubstr",
|
||||||
"AvailableEntities", "AllReactants", "AllInhibitors",
|
"AvailableEntities", "AllReactants", "AllInhibitors",
|
||||||
@ -217,6 +217,7 @@ AssertAssignmentVar: assert::AssignmentVariable = {
|
|||||||
|
|
||||||
AssertVariable: assert::Variable = {
|
AssertVariable: assert::Variable = {
|
||||||
"label" => assert::Variable::Label,
|
"label" => assert::Variable::Label,
|
||||||
|
"edge" => assert::Variable::Edge,
|
||||||
<v: Literal> => assert::Variable::Id(v),
|
<v: Literal> => assert::Variable::Id(v),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,6 +263,9 @@ AssertUnarySuffix: assert::Unary = {
|
|||||||
".length" => assert::Unary::Length,
|
".length" => assert::Unary::Length,
|
||||||
".tostr" => assert::Unary::ToStr,
|
".tostr" => assert::Unary::ToStr,
|
||||||
".toel" => assert::Unary::ToEl,
|
".toel" => assert::Unary::ToEl,
|
||||||
|
".source" => assert::Unary::Source,
|
||||||
|
".target" => assert::Unary::Target,
|
||||||
|
".neighbours" => assert::Unary::Neighbours,
|
||||||
"." <q: AssertQualifier> => assert::Unary::Qualifier(q),
|
"." <q: AssertQualifier> => assert::Unary::Qualifier(q),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -81,17 +81,13 @@ fn filter_delta<'a>(x: (&IdType, &'a RSprocess)) -> Option<&'a RSset> {
|
|||||||
use super::structure::RSprocess::*;
|
use super::structure::RSprocess::*;
|
||||||
let (id, rest) = x;
|
let (id, rest) = x;
|
||||||
|
|
||||||
if let EntitySet {
|
if let EntitySet { entities, next_process } = rest
|
||||||
entities,
|
&& let RecursiveIdentifier { identifier } = &**next_process
|
||||||
next_process,
|
&& identifier == id
|
||||||
} = rest
|
|
||||||
{
|
{
|
||||||
if let RecursiveIdentifier { identifier } = &**next_process {
|
return Some(entities);
|
||||||
if identifier == id {
|
|
||||||
return Some(entities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,16 +192,11 @@ fn filter_delta_named<'a>(
|
|||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
if let EntitySet {
|
if let EntitySet { entities, next_process } = rest
|
||||||
entities,
|
&& let RecursiveIdentifier { identifier } = &**next_process
|
||||||
next_process,
|
&& identifier == id
|
||||||
} = rest
|
|
||||||
{
|
{
|
||||||
if let RecursiveIdentifier { identifier } = &**next_process {
|
return Some(entities);
|
||||||
if identifier == id {
|
|
||||||
return Some(entities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,13 @@ Reactions: ([{a,b}, {c}, {b}])
|
|||||||
|
|
||||||
Bisimilarity ("testing/adversarial.system") > Print,
|
Bisimilarity ("testing/adversarial.system") > Print,
|
||||||
Digraph > Dot
|
Digraph > Dot
|
||||||
| Entities
|
| Entities " - " Context " - entities masked: " MaskEntities {a}
|
||||||
| Entities
|
| Entities
|
||||||
| ! "white"
|
| EntitiesDeleted {a} ? "blue" ! "white"
|
||||||
| ! "black" > Print
|
| ! "black"
|
||||||
|
> Print,
|
||||||
|
|
||||||
|
Digraph > GraphML
|
||||||
|
| Entities
|
||||||
|
| Entities
|
||||||
|
> Print
|
||||||
|
|||||||
Reference in New Issue
Block a user