Rename types for consistency
This commit is contained in:
30
src/ast.rs
30
src/ast.rs
@@ -2,12 +2,12 @@
|
||||
|
||||
pub enum BinaryOperator
|
||||
{
|
||||
Addition,
|
||||
Subtraction,
|
||||
Multiplication,
|
||||
Division,
|
||||
Add,
|
||||
Subtract,
|
||||
Multiply,
|
||||
Divide,
|
||||
Modulo,
|
||||
Exponentiation,
|
||||
Exponentiate,
|
||||
}
|
||||
|
||||
pub enum ComparisonOperator
|
||||
@@ -23,7 +23,7 @@ pub enum ComparisonOperator
|
||||
pub enum UnaryOperator
|
||||
{
|
||||
AbsoluteValue,
|
||||
Negation,
|
||||
Negative,
|
||||
}
|
||||
|
||||
// Primitives
|
||||
@@ -153,13 +153,7 @@ pub struct Variable
|
||||
|
||||
// Formulas
|
||||
|
||||
pub struct Biconditional
|
||||
{
|
||||
pub left: Box<Formula>,
|
||||
pub right: Box<Formula>,
|
||||
}
|
||||
|
||||
pub struct Comparison
|
||||
pub struct Compare
|
||||
{
|
||||
pub operator: ComparisonOperator,
|
||||
pub left: Box<Term>,
|
||||
@@ -178,6 +172,12 @@ pub struct ForAll
|
||||
pub argument: Box<Formula>,
|
||||
}
|
||||
|
||||
pub struct IfAndOnlyIf
|
||||
{
|
||||
pub left: Box<Formula>,
|
||||
pub right: Box<Formula>,
|
||||
}
|
||||
|
||||
pub struct Implies
|
||||
{
|
||||
pub antecedent: Box<Formula>,
|
||||
@@ -210,11 +210,11 @@ pub type Terms = Vec<Box<Term>>;
|
||||
pub enum Formula
|
||||
{
|
||||
And(Formulas),
|
||||
Biconditional(Biconditional),
|
||||
Boolean(bool),
|
||||
Comparison(Comparison),
|
||||
Compare(Compare),
|
||||
Exists(Exists),
|
||||
ForAll(ForAll),
|
||||
IfAndOnlyIf(IfAndOnlyIf),
|
||||
Implies(Implies),
|
||||
Not(Box<Formula>),
|
||||
Or(Formulas),
|
||||
|
Reference in New Issue
Block a user