feat: Atom parsing

This commit is contained in:
Tibo De Peuter 2025-04-16 14:04:39 +02:00
parent bd5c825ca2
commit e749f8c6cb
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
8 changed files with 212 additions and 11 deletions

View file

@ -13,4 +13,12 @@ open class Atom(val name: String) : Goal(), Head, Body, Resolvent {
override fun toString(): String {
return name
}
override fun equals(other: Any?): Boolean {
return (this === other) || (other is Atom && functor == other.functor)
}
override fun hashCode(): Int {
return javaClass.hashCode()
}
}

View file

@ -1,4 +1,4 @@
package prolog.builtins
package prolog.logic
import prolog.ast.terms.Atom
import prolog.ast.terms.Term