Assert against empty parameter lists
This commit is contained in:
parent
5e39fc5cec
commit
171c725fb8
@ -502,6 +502,8 @@ impl Formula
|
||||
|
||||
pub fn exists(parameters: std::rc::Rc<VariableDeclarations>, argument: Box<Formula>) -> Self
|
||||
{
|
||||
assert!(!parameters.is_empty());
|
||||
|
||||
Self::Exists(Exists::new(parameters, argument))
|
||||
}
|
||||
|
||||
@ -517,6 +519,8 @@ impl Formula
|
||||
|
||||
pub fn for_all(parameters: std::rc::Rc<VariableDeclarations>, argument: Box<Formula>) -> Self
|
||||
{
|
||||
assert!(!parameters.is_empty());
|
||||
|
||||
Self::ForAll(ForAll::new(parameters, argument))
|
||||
}
|
||||
|
||||
|
@ -205,6 +205,8 @@ impl<'formula> std::fmt::Debug for FormulaDisplay<'formula>
|
||||
{
|
||||
crate::Formula::Exists(exists) =>
|
||||
{
|
||||
assert!(!exists.parameters.is_empty());
|
||||
|
||||
write!(format, "exists")?;
|
||||
|
||||
let mut separator = " ";
|
||||
@ -220,6 +222,8 @@ impl<'formula> std::fmt::Debug for FormulaDisplay<'formula>
|
||||
},
|
||||
crate::Formula::ForAll(for_all) =>
|
||||
{
|
||||
assert!(!for_all.parameters.is_empty());
|
||||
|
||||
write!(format, "forall")?;
|
||||
|
||||
let mut separator = " ";
|
||||
|
Loading…
Reference in New Issue
Block a user