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

Discussion

What is the declarative reading of a logic program?

  • A.What the program means as a set of logical sentences
  • B.The order in which the interpreter will try the clauses
  • C.The output the program produces on a given input
  • D.The documentation describing what the program should do

Answer: A

The declarative reading treats the clauses as implications and asks what follows, while the procedural reading describes how the interpreter will actually search. The two agree only when the program terminates and the search strategy finds what is entailed. Output and documentation are different notions. Having two readings of the same text, one of which is a guarantee and the other a behaviour, is characteristic of logic programming and is the source of most of its surprises.

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

Post your comment

Please log in or register to post a comment.