Checkpoint
This commit is contained in:
parent
e3c84e1761
commit
e73e5cbfc8
32 changed files with 1354 additions and 92 deletions
12
src/prolog/ast/arithmetic/ArithmeticOperator.kt
Normal file
12
src/prolog/ast/arithmetic/ArithmeticOperator.kt
Normal file
|
@ -0,0 +1,12 @@
|
|||
package prolog.ast.arithmetic
|
||||
|
||||
import prolog.ast.terms.Atom
|
||||
import prolog.ast.terms.Operator
|
||||
import prolog.ast.terms.Term
|
||||
import prolog.logic.Substituted
|
||||
|
||||
abstract class ArithmeticOperator(symbol: Atom, leftOperand: Expression, rightOperand: Expression) :
|
||||
Operator(symbol, leftOperand, rightOperand), Expression {
|
||||
// Operators should overload the evaluate method to perform the operation
|
||||
abstract override fun evaluate(subs: Substituted): Pair<Term, Substituted>
|
||||
}
|
Reference in a new issue