You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.4 KiB
83 lines
1.4 KiB
#[derive(Eq, Hash, PartialEq)] |
|
pub struct PredicateDeclaration |
|
{ |
|
pub name: String, |
|
pub arity: usize, |
|
} |
|
|
|
#[derive(PartialEq)] |
|
pub struct Predicate |
|
{ |
|
pub declaration: PredicateDeclaration, |
|
pub arguments: Vec<Term>, |
|
} |
|
|
|
#[derive(PartialEq)] |
|
pub struct Exists |
|
{ |
|
pub parameters: Vec<VariableDeclaration>, |
|
pub argument: Box<Formula>, |
|
} |
|
|
|
#[derive(PartialEq)] |
|
pub struct ForAll |
|
{ |
|
pub parameters: Vec<VariableDeclaration>, |
|
pub argument: Box<Formula>, |
|
} |
|
|
|
#[derive(PartialEq)] |
|
pub enum ImplicationDirection |
|
{ |
|
LeftToRight, |
|
RightToLeft, |
|
} |
|
|
|
#[derive(PartialEq)] |
|
pub enum Formula |
|
{ |
|
Exists(Exists), |
|
ForAll(ForAll), |
|
Not(Box<Formula>), |
|
And(Vec<Box<Formula>>), |
|
Or(Vec<Box<Formula>>), |
|
Implies(Box<Formula>, Box<Formula>, ImplicationDirection), |
|
Biconditional(Box<Formula>, Box<Formula>), |
|
Less(Term, Term), |
|
LessOrEqual(Term, Term), |
|
Greater(Term, Term), |
|
GreaterOrEqual(Term, Term), |
|
Equal(Term, Term), |
|
NotEqual(Term, Term), |
|
Boolean(bool), |
|
Predicate(Predicate), |
|
} |
|
|
|
#[derive(Eq, Hash, PartialEq)] |
|
pub enum Domain |
|
{ |
|
Program, |
|
Integer, |
|
} |
|
|
|
#[derive(PartialEq)] |
|
pub struct VariableDeclaration |
|
{ |
|
pub name: String, |
|
pub domain: Domain, |
|
} |
|
|
|
#[derive(PartialEq)] |
|
pub enum Term |
|
{ |
|
Infimum, |
|
Supremum, |
|
Integer(i64), |
|
Symbolic(String), |
|
String(String), |
|
Variable(VariableDeclaration), |
|
Add(Box<Term>, Box<Term>), |
|
Subtract(Box<Term>, Box<Term>), |
|
Multiply(Box<Term>, Box<Term>), |
|
Negative(Box<Term>), |
|
}
|
|
|