He is widely recognized as the creator of Prolog and drove its practical implementation for natural language processing.
Alain Colmerauer
The full phrase that the abbreviation “Prolog” stands for.
What are the three basic constructs used to build programs in Prolog?
facts, rules, and queries.
This specific symbol must be used at the end of every Prolog statement to terminate a clause or query.
( . ) (Period)
It is the combination of an atom and its arity used to name compound terms.
Functor
Prolog is classified as an imperative programming language because the programmer specifies exactly how to compute a result.
False (It is a Declarative Logic Programming language)
Variables in Prolog must always begin with an uppercase letter or an underscore (_).
True
Prolog uses traditional for and while loops to perform repetitive tasks.
False (Iteration is achieved through recursion)
The “Cut” operator, which is used to prevent backtracking, is represented by the exclamation mark symbol (!).
True
The standard file extension for Prolog source files is typically .pl or .pro
True
Given the query, what is the value of Tail?
?- [Head | Tail] = [jude, jona, kaye].
Tail = [jona, kaye]
Given the facts and rules, what query can invoke the output?
dog(ringgo).
dog(georgia).
owns(kaye, Pet):- dog(Pet).
loves(Who, What):- owns(Who, What).
Who = kaye,
What = ringgo ;
Who = kaye,
What = georgia
-? loves(Who, What)
Given the facts, what is the result of the query?
friend(ace, mark).
friend(mark, jude).
?- friend(ace, X), friend(X, jude).
X = mark
Given the facts and rules, what is the result of the query?
is_compsci(ace).
is_compsci(ecie).
is_nursing(alecs).
is_business(sophia).
not_compsci(X) :- + is_compsci(X).
?- not_compsci(sophia).
true
If a rule is defined as follows, what is the result of the query?
double(X, Y) :- Y is X * 2
?- double(10, Result).
Result = 20