Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?



Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation..

Answer / chaitanya

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
Through cut, we can often improve the efficiency of the program
We can specify exclusive rules using cut

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned

1 Answers  


 Explain what is prolog programming language? What is it based on?

1 Answers  


 Which is uses their arguments to build intermediate forms and evaluating them to produce a value? a) Backquote b) Macros c) List d) Procedures

1 Answers  


Which forms can be constructed with the same primitives that manipulate lisp expressions? a) Lisp b) Macro c) Procedure d) Defun

1 Answers  


 What is the output of the given statement? * (setf pressure -3) * (when-plusp pressure (print ‘alarm)); a) T b) Nil c) Alarm d) None of the mentioned

1 Answers  






Which makes it easy to identify the first entry encountered that satisfies a given predicate? a) Reusing b) Revoking c) Template d) Filtering

1 Answers  


 Which process helps to build large and complicated programs in LISP? a) Macros b) Procedure abstraction c) Defun d) None 

1 Answers  


 What is partly embedded in the knowledge of your programming for manipulating applications? a) Programming cliches b) Procedures c) Abstraction d) Data

1 Answers  


Which is a string of boxes linked by arrow like pointers in LISP? a) Lisp b) List c) Variables d) Pointers

1 Answers  


Which is used to seperate the abstraction layers? a) Abstraction boundaries b) Data c) Procedure d) All of the mentioned

1 Answers  


 What is the output of the following statement? * (setf book (book=author-writer book ‘(guy steele))) a) Guy b) Steele c) Error d) None of the mentioned

1 Answers  


 How data types are categorized in LISP?

1 Answers  


Categories