Clean-up
This commit is contained in:
parent
491a255811
commit
1b827edd45
22
src/error.rs
22
src/error.rs
@ -25,9 +25,7 @@ pub enum Kind
|
||||
UnknownColorChoice(String),
|
||||
VariableNameNotAllowed(String),
|
||||
FormulaNotClosed(std::rc::Rc<crate::VariableDeclarations>),
|
||||
NoCompletedDefinitionFound(std::rc::Rc<crate::PredicateDeclaration>),
|
||||
PrivatePredicateCycle(std::rc::Rc<crate::PredicateDeclaration>),
|
||||
PrivatePredicateInSpecification(std::rc::Rc<crate::PredicateDeclaration>),
|
||||
PrivatePredicateDependingOnPublicPredicate(std::rc::Rc<crate::PredicateDeclaration>,
|
||||
std::rc::Rc<crate::PredicateDeclaration>),
|
||||
RunVampire,
|
||||
@ -161,13 +159,6 @@ impl Error
|
||||
Self::new(Kind::FormulaNotClosed(free_variables))
|
||||
}
|
||||
|
||||
pub(crate) fn new_no_completed_definition_found(
|
||||
predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>)
|
||||
-> Self
|
||||
{
|
||||
Self::new(Kind::NoCompletedDefinitionFound(predicate_declaration))
|
||||
}
|
||||
|
||||
pub(crate) fn new_private_predicate_cycle(
|
||||
predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>)
|
||||
-> Self
|
||||
@ -175,13 +166,6 @@ impl Error
|
||||
Self::new(Kind::PrivatePredicateCycle(predicate_declaration))
|
||||
}
|
||||
|
||||
pub(crate) fn new_private_predicate_in_specification(
|
||||
predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>)
|
||||
-> Self
|
||||
{
|
||||
Self::new(Kind::PrivatePredicateInSpecification(predicate_declaration))
|
||||
}
|
||||
|
||||
pub(crate) fn new_private_predicate_depending_on_public_predicate(
|
||||
private_predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>,
|
||||
public_predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>)
|
||||
@ -267,16 +251,10 @@ impl std::fmt::Debug for Error
|
||||
|
||||
write!(formatter, ")")
|
||||
},
|
||||
Kind::NoCompletedDefinitionFound(ref predicate_declaration) =>
|
||||
write!(formatter, "no completed definition found for {}", predicate_declaration.declaration),
|
||||
Kind::PrivatePredicateCycle(ref predicate_declaration) =>
|
||||
write!(formatter,
|
||||
"program is not supertight (private predicate {} transitively depends on itself)",
|
||||
predicate_declaration.declaration),
|
||||
Kind::PrivatePredicateInSpecification(ref predicate_declaration) =>
|
||||
write!(formatter,
|
||||
"private predicate {} should not occur in specification (consider declaring it an input or output predicate)",
|
||||
predicate_declaration.declaration),
|
||||
Kind::PrivatePredicateDependingOnPublicPredicate(ref private_predicate_declaration,
|
||||
ref public_predicate_declaration) =>
|
||||
write!(formatter,
|
||||
|
@ -212,6 +212,7 @@ fn copy_quantified_formula(quantified_expression: &crate::QuantifiedFormula)
|
||||
crate::QuantifiedFormula::new(copy_parameters, Box::new(copy_argument))
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn copy_formula(formula: &crate::Formula) -> crate::Formula
|
||||
{
|
||||
use crate::Formula;
|
||||
|
Loading…
Reference in New Issue
Block a user