diff --git a/src/ast.rs b/src/ast.rs index 785947e..08a44dc 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -165,12 +165,12 @@ impl BinaryOperation pub struct Function { pub declaration: std::rc::Rc, - pub arguments: Vec>, + pub arguments: Terms, } impl Function { - pub fn new(declaration: std::rc::Rc, arguments: Vec>) -> Self + pub fn new(declaration: std::rc::Rc, arguments: Terms) -> Self { assert_eq!(declaration.arity, arguments.len(), "function has a different number of arguments then declared"); @@ -288,12 +288,12 @@ impl Implies pub struct Predicate { pub declaration: std::rc::Rc, - pub arguments: Vec>, + pub arguments: Terms, } impl Predicate { - pub fn new(declaration: std::rc::Rc, arguments: Vec>) -> Self + pub fn new(declaration: std::rc::Rc, arguments: Terms) -> Self { assert_eq!(declaration.arity, arguments.len(), "predicate has a different number of arguments then declared"); @@ -320,7 +320,7 @@ pub enum Term Variable(Variable), } -pub type Terms = Vec>; +pub type Terms = Vec; impl Term { @@ -359,8 +359,7 @@ impl Term Self::boolean(false) } - pub fn function(declaration: std::rc::Rc, arguments: Vec>) - -> Self + pub fn function(declaration: std::rc::Rc, arguments: Terms) -> Self { Self::Function(Function::new(declaration, arguments)) } @@ -440,7 +439,7 @@ pub enum Formula Predicate(Predicate), } -pub type Formulas = Vec>; +pub type Formulas = Vec; impl Formula { @@ -533,8 +532,7 @@ impl Formula Self::Or(arguments) } - pub fn predicate(declaration: std::rc::Rc, arguments: Vec>) - -> Self + pub fn predicate(declaration: std::rc::Rc, arguments: Terms) -> Self { Self::Predicate(Predicate::new(declaration, arguments)) }