Use ordered sets for declarations
This replaces the unordered sets used for function and predicate declarations with ordered sets. This is useful when these declarations are supposed to be processed in a stable and meaningful order.
This commit is contained in:
parent
e1d616d8b4
commit
3e6e68f6ea
@ -47,7 +47,7 @@ impl FunctionDeclaration
|
||||
}
|
||||
}
|
||||
|
||||
pub type FunctionDeclarations = std::collections::HashSet<std::rc::Rc<FunctionDeclaration>>;
|
||||
pub type FunctionDeclarations = std::collections::BTreeSet<std::rc::Rc<FunctionDeclaration>>;
|
||||
|
||||
#[derive(Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
pub struct PredicateDeclaration
|
||||
@ -68,7 +68,7 @@ impl PredicateDeclaration
|
||||
}
|
||||
}
|
||||
|
||||
pub type PredicateDeclarations = std::collections::HashSet<std::rc::Rc<PredicateDeclaration>>;
|
||||
pub type PredicateDeclarations = std::collections::BTreeSet<std::rc::Rc<PredicateDeclaration>>;
|
||||
|
||||
#[derive(Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
pub struct VariableDeclaration
|
||||
|
@ -211,7 +211,7 @@ impl<'formula> std::fmt::Debug for FormulaDisplay<'formula>
|
||||
|
||||
let mut separator = " ";
|
||||
|
||||
for parameter in &exists.parameters
|
||||
for parameter in exists.parameters.iter()
|
||||
{
|
||||
write!(format, "{}{:?}", separator, parameter)?;
|
||||
|
||||
@ -226,7 +226,7 @@ impl<'formula> std::fmt::Debug for FormulaDisplay<'formula>
|
||||
|
||||
let mut separator = " ";
|
||||
|
||||
for parameter in &for_all.parameters
|
||||
for parameter in for_all.parameters.iter()
|
||||
{
|
||||
write!(format, "{}{:?}", separator, parameter)?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user