Checkpoint
This commit is contained in:
parent
9db1c66781
commit
724e911a6f
17 changed files with 288 additions and 95 deletions
|
@ -66,6 +66,14 @@ open class Preprocessor {
|
|||
when {
|
||||
// TODO Remove hardcoding by storing the functors as constants in operators?
|
||||
// Logic
|
||||
term.functor == "=/2" -> {
|
||||
Unify(args[0], args[1])
|
||||
}
|
||||
|
||||
term.functor == "\\=/2" -> {
|
||||
NotUnify(args[0], args[1])
|
||||
}
|
||||
|
||||
term.functor == ",/2" -> {
|
||||
Conjunction(args[0] as LogicOperand, args[1] as LogicOperand)
|
||||
}
|
||||
|
@ -92,14 +100,6 @@ open class Preprocessor {
|
|||
|
||||
// Arithmetic
|
||||
|
||||
term.functor == "=/2" && args.all { it is Expression } -> {
|
||||
Unify(args[0] as Expression, args[1] as Expression)
|
||||
}
|
||||
|
||||
term.functor == "\\=/2" && args.all { it is Expression } -> {
|
||||
NotUnify(args[0] as Expression, args[1] as Expression)
|
||||
}
|
||||
|
||||
term.functor == "-/1" && args.all { it is Expression } -> {
|
||||
Negate(args[0] as Expression)
|
||||
}
|
||||
|
|
Reference in a new issue