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),
|
UnknownColorChoice(String),
|
||||||
VariableNameNotAllowed(String),
|
VariableNameNotAllowed(String),
|
||||||
FormulaNotClosed(std::rc::Rc<crate::VariableDeclarations>),
|
FormulaNotClosed(std::rc::Rc<crate::VariableDeclarations>),
|
||||||
NoCompletedDefinitionFound(std::rc::Rc<crate::PredicateDeclaration>),
|
|
||||||
PrivatePredicateCycle(std::rc::Rc<crate::PredicateDeclaration>),
|
PrivatePredicateCycle(std::rc::Rc<crate::PredicateDeclaration>),
|
||||||
PrivatePredicateInSpecification(std::rc::Rc<crate::PredicateDeclaration>),
|
|
||||||
PrivatePredicateDependingOnPublicPredicate(std::rc::Rc<crate::PredicateDeclaration>,
|
PrivatePredicateDependingOnPublicPredicate(std::rc::Rc<crate::PredicateDeclaration>,
|
||||||
std::rc::Rc<crate::PredicateDeclaration>),
|
std::rc::Rc<crate::PredicateDeclaration>),
|
||||||
RunVampire,
|
RunVampire,
|
||||||
@ -161,13 +159,6 @@ impl Error
|
|||||||
Self::new(Kind::FormulaNotClosed(free_variables))
|
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(
|
pub(crate) fn new_private_predicate_cycle(
|
||||||
predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>)
|
predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>)
|
||||||
-> Self
|
-> Self
|
||||||
@ -175,13 +166,6 @@ impl Error
|
|||||||
Self::new(Kind::PrivatePredicateCycle(predicate_declaration))
|
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(
|
pub(crate) fn new_private_predicate_depending_on_public_predicate(
|
||||||
private_predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>,
|
private_predicate_declaration: std::rc::Rc<crate::PredicateDeclaration>,
|
||||||
public_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, ")")
|
write!(formatter, ")")
|
||||||
},
|
},
|
||||||
Kind::NoCompletedDefinitionFound(ref predicate_declaration) =>
|
|
||||||
write!(formatter, "no completed definition found for {}", predicate_declaration.declaration),
|
|
||||||
Kind::PrivatePredicateCycle(ref predicate_declaration) =>
|
Kind::PrivatePredicateCycle(ref predicate_declaration) =>
|
||||||
write!(formatter,
|
write!(formatter,
|
||||||
"program is not supertight (private predicate {} transitively depends on itself)",
|
"program is not supertight (private predicate {} transitively depends on itself)",
|
||||||
predicate_declaration.declaration),
|
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,
|
Kind::PrivatePredicateDependingOnPublicPredicate(ref private_predicate_declaration,
|
||||||
ref public_predicate_declaration) =>
|
ref public_predicate_declaration) =>
|
||||||
write!(formatter,
|
write!(formatter,
|
||||||
|
@ -212,6 +212,7 @@ fn copy_quantified_formula(quantified_expression: &crate::QuantifiedFormula)
|
|||||||
crate::QuantifiedFormula::new(copy_parameters, Box::new(copy_argument))
|
crate::QuantifiedFormula::new(copy_parameters, Box::new(copy_argument))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) fn copy_formula(formula: &crate::Formula) -> crate::Formula
|
pub(crate) fn copy_formula(formula: &crate::Formula) -> crate::Formula
|
||||||
{
|
{
|
||||||
use crate::Formula;
|
use crate::Formula;
|
||||||
|
Loading…
Reference in New Issue
Block a user