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 |
Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned
Explain what is prolog programming language? What is it based on?
Which is uses their arguments to build intermediate forms and evaluating them to produce a value? a) Backquote b) Macros c) List d) Procedures
Which forms can be constructed with the same primitives that manipulate lisp expressions? a) Lisp b) Macro c) Procedure d) Defun
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
Which makes it easy to identify the first entry encountered that satisfies a given predicate? a) Reusing b) Revoking c) Template d) Filtering
Which process helps to build large and complicated programs in LISP? a) Macros b) Procedure abstraction c) Defun d) None
What is partly embedded in the knowledge of your programming for manipulating applications? a) Programming cliches b) Procedures c) Abstraction d) Data
Which is a string of boxes linked by arrow like pointers in LISP? a) Lisp b) List c) Variables d) Pointers
Which is used to seperate the abstraction layers? a) Abstraction boundaries b) Data c) Procedure d) All of the mentioned
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
How data types are categorized in LISP?