What is the cut in Prolog?
Answer: C
The cut commits the search to the choices made so far, which improves efficiency and destroys the declarative reading, since the program's meaning now depends on the search order. Clause removal, depth limits and syntax are different notions. A construct that buys performance by breaking the correspondence between what a program says and what it does is a genuine engineering compromise, and the debate over its use has run for decades. Naming the cost of a choice alongside its benefit is what turns a fact into a design decision.
Please log in or register to report this question.