0 votes
in Prolog by
Mention What Is Cut (!) In Prolog And What Is The Advantage Of ‘cut’ And ‘negation’?

1 Answer

0 votes
by

Cut function is used in Prolog when you want to restrict Prolog from backtracking into certain choicepoints or subgoals, either because the alternatives would give wrong solutions or for efficiency reasons.

Advantage of using cut in Prolog is :

  1. Through cut, we can often improve the efficiency of the program
  2. We can specify exclusive rules using cut
...