More specific visibility for assert
This commit is contained in:
@ -3,7 +3,7 @@ fn main() {
|
|||||||
|
|
||||||
use reactionsystems::rsprocess::presets;
|
use reactionsystems::rsprocess::presets;
|
||||||
match presets::run("testing/first.system".into()) {
|
match presets::run("testing/first.system".into()) {
|
||||||
Ok(_) => {},
|
Ok(()) => {},
|
||||||
Err(e) => {println!("{e}")}
|
Err(e) => {println!("{e}")}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -160,7 +160,7 @@ pub enum QualifierRestricted {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl QualifierRestricted {
|
impl QualifierRestricted {
|
||||||
pub fn referenced_mut<'a>(
|
pub(super) fn referenced_mut<'a>(
|
||||||
&self,
|
&self,
|
||||||
label: &'a mut super::structure::RSlabel,
|
label: &'a mut super::structure::RSlabel,
|
||||||
) -> &'a mut super::structure::RSset {
|
) -> &'a mut super::structure::RSset {
|
||||||
@ -175,7 +175,7 @@ impl QualifierRestricted {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn referenced<'a>(
|
pub(super) fn referenced<'a>(
|
||||||
&self,
|
&self,
|
||||||
label: &'a super::structure::RSlabel,
|
label: &'a super::structure::RSlabel,
|
||||||
) -> &'a super::structure::RSset {
|
) -> &'a super::structure::RSset {
|
||||||
@ -200,7 +200,7 @@ pub enum QualifierLabel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl QualifierLabel {
|
impl QualifierLabel {
|
||||||
pub fn get(
|
pub(super) fn get(
|
||||||
&self,
|
&self,
|
||||||
l: &super::structure::RSlabel,
|
l: &super::structure::RSlabel,
|
||||||
) -> AssertReturnValue {
|
) -> AssertReturnValue {
|
||||||
@ -229,7 +229,7 @@ pub enum QualifierSystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl QualifierSystem {
|
impl QualifierSystem {
|
||||||
pub fn get(
|
pub(super) fn get(
|
||||||
&self,
|
&self,
|
||||||
l: &super::structure::RSsystem,
|
l: &super::structure::RSsystem,
|
||||||
) -> AssertReturnValue {
|
) -> AssertReturnValue {
|
||||||
@ -413,14 +413,14 @@ struct TypeContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl TypeContext {
|
impl TypeContext {
|
||||||
pub fn new() -> Self {
|
fn new() -> Self {
|
||||||
TypeContext {
|
TypeContext {
|
||||||
data: HashMap::new(),
|
data: HashMap::new(),
|
||||||
return_ty: None
|
return_ty: None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn assign(
|
fn assign(
|
||||||
&mut self,
|
&mut self,
|
||||||
v: &AssignmentVariable,
|
v: &AssignmentVariable,
|
||||||
ty: AssertionTypes
|
ty: AssertionTypes
|
||||||
@ -452,7 +452,7 @@ impl TypeContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn return_type(
|
fn return_type(
|
||||||
&mut self,
|
&mut self,
|
||||||
ty: AssertionTypes
|
ty: AssertionTypes
|
||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
@ -469,7 +469,7 @@ impl TypeContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn assign_range(
|
fn assign_range(
|
||||||
&mut self,
|
&mut self,
|
||||||
v: &Variable,
|
v: &Variable,
|
||||||
ty: AssertionTypes
|
ty: AssertionTypes
|
||||||
@ -499,7 +499,7 @@ impl TypeContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get(
|
fn get(
|
||||||
&self,
|
&self,
|
||||||
v: &AssignmentVariable,
|
v: &AssignmentVariable,
|
||||||
) -> Result<AssertionTypes, String> {
|
) -> Result<AssertionTypes, String> {
|
||||||
@ -545,14 +545,14 @@ struct Context<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Context<'a> {
|
impl<'a> Context<'a> {
|
||||||
pub fn new(
|
fn new(
|
||||||
label: &'a super::structure::RSlabel,
|
label: &'a super::structure::RSlabel,
|
||||||
edge: &'a petgraph::graph::EdgeIndex,
|
edge: &'a petgraph::graph::EdgeIndex,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self { data: HashMap::new(), label, edge }
|
Self { data: HashMap::new(), label, edge }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn assign(
|
fn assign(
|
||||||
&mut self,
|
&mut self,
|
||||||
v: &AssignmentVariable,
|
v: &AssignmentVariable,
|
||||||
val: AssertReturnValue,
|
val: AssertReturnValue,
|
||||||
@ -610,7 +610,7 @@ impl<'a> Context<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get(
|
fn get(
|
||||||
&self,
|
&self,
|
||||||
v: &AssignmentVariable
|
v: &AssignmentVariable
|
||||||
) -> Result<AssertReturnValue, String> {
|
) -> Result<AssertReturnValue, String> {
|
||||||
@ -684,7 +684,7 @@ pub enum AssertReturnValue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl AssertReturnValue {
|
impl AssertReturnValue {
|
||||||
pub fn unary(
|
fn unary(
|
||||||
self,
|
self,
|
||||||
u: &Unary,
|
u: &Unary,
|
||||||
translator: &mut super::translator::Translator,
|
translator: &mut super::translator::Translator,
|
||||||
@ -753,7 +753,7 @@ impl AssertReturnValue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn binary(
|
fn binary(
|
||||||
self,
|
self,
|
||||||
b: &Binary,
|
b: &Binary,
|
||||||
other: AssertReturnValue,
|
other: AssertReturnValue,
|
||||||
|
|||||||
@ -14,6 +14,6 @@ pub mod rsdot;
|
|||||||
pub mod serialize;
|
pub mod serialize;
|
||||||
pub mod presets;
|
pub mod presets;
|
||||||
pub mod bisimilarity;
|
pub mod bisimilarity;
|
||||||
|
pub mod assert;
|
||||||
|
|
||||||
mod format_helpers;
|
mod format_helpers;
|
||||||
mod assert;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user