Machine-translated by Google. Questions are authored in English.
Top

Discussion

What is the occurs check in unification?

  • A.Testing whether a variable appears inside the term it is bound to
  • B.Checking whether a symbol occurs anywhere in the knowledge base
  • C.Verifying that each variable occurs at most once in a clause
  • D.Counting how often a predicate occurs among the premises

Answer: A

Binding a variable to a term containing that same variable would create an infinite term, so the check rejects it, and omitting it makes the procedure unsound though faster. Many Prolog implementations omit it by default for that reason. Symbol occurrence, linearity and frequency are different notions. A soundness check omitted for speed, with the unsoundness considered acceptable in practice, is an engineering compromise worth knowing about explicitly.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.