Remove unused code
This commit is contained in:
parent
7a6fab59ef
commit
cede63b7e4
60
src/utils.rs
60
src/utils.rs
@ -125,65 +125,5 @@ pub(crate) fn universal_closure(scoped_formula: crate::ScopedFormula) -> foliage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*pub fn parse_predicate_declaration(input: &str)
|
|
||||||
-> Result<std::rc::Rc<foliage::PredicateDeclaration>, crate::Error>
|
|
||||||
{
|
|
||||||
let mut parts = input.split("/");
|
|
||||||
|
|
||||||
let name = parts.next().ok_or(crate::Error::new_parse_predicate_declaration())?;
|
|
||||||
|
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
let arity = match parts.next()
|
|
||||||
{
|
|
||||||
Some(arity)
|
|
||||||
=> usize::from_str(arity).map_err(|_| crate::Error::new_parse_predicate_declaration())?,
|
|
||||||
None => 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
if parts.next().is_some()
|
|
||||||
{
|
|
||||||
return Err(crate::Error::new_parse_predicate_declaration());
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(std::rc::Rc::new(foliage::PredicateDeclaration
|
|
||||||
{
|
|
||||||
name: name.to_string(),
|
|
||||||
arity,
|
|
||||||
}))
|
|
||||||
}*/
|
|
||||||
|
|
||||||
pub type InputConstantDeclarationDomains
|
pub type InputConstantDeclarationDomains
|
||||||
= std::collections::BTreeMap<std::rc::Rc<foliage::FunctionDeclaration>, Domain>;
|
= std::collections::BTreeMap<std::rc::Rc<foliage::FunctionDeclaration>, Domain>;
|
||||||
|
|
||||||
/*pub fn parse_constant_declaration(input: &str)
|
|
||||||
-> Result<(std::rc::Rc<foliage::FunctionDeclaration>, crate::Domain), crate::Error>
|
|
||||||
{
|
|
||||||
let mut parts = input.split(":");
|
|
||||||
|
|
||||||
let name = parts.next().ok_or(crate::Error::new_parse_constant_declaration())?.trim();
|
|
||||||
|
|
||||||
let domain = match parts.next()
|
|
||||||
{
|
|
||||||
None => crate::Domain::Program,
|
|
||||||
Some(value) => match value.trim()
|
|
||||||
{
|
|
||||||
"program" => crate::Domain::Program,
|
|
||||||
"integer" => crate::Domain::Integer,
|
|
||||||
_ => return Err(crate::Error::new_parse_constant_declaration()),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
if parts.next().is_some()
|
|
||||||
{
|
|
||||||
return Err(crate::Error::new_parse_constant_declaration());
|
|
||||||
}
|
|
||||||
|
|
||||||
let constant_declaration = std::rc::Rc::new(foliage::FunctionDeclaration
|
|
||||||
{
|
|
||||||
name: name.to_string(),
|
|
||||||
arity: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
Ok((constant_declaration, domain))
|
|
||||||
}*/
|
|
||||||
|
Loading…
Reference in New Issue
Block a user