Skip to content

Instantly share code, notes, and snippets.

@moleike
Last active November 17, 2022 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moleike/a7cf8a2ed233b7f3f797df10a3c10b9b to your computer and use it in GitHub Desktop.
Save moleike/a7cf8a2ed233b7f3f797df10a3c10b9b to your computer and use it in GitHub Desktop.
sealed trait Term
case class Const(name: String) extends Term
case class Var(name: String) extends Term
case class Atom(relation: String, terms: Term*)
sealed trait Clause
case class Rule(head: Atom, body: Atom*) extends Clause
case class Fact(atom: Atom) extends Clause
case class Query(name: String, atoms: Atom*) extends Clause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment