CSCI 316: Quiz 14 - Logic Programming Languages
Sign in to Google
to save your progress.
Learn more
* Indicates required question
Email
*
Your email
Last Name
*
Your answer
First Name
*
Your answer
Student Id
*
Your answer
Logic programming languages are primarily based on which formal system?
*
1 point
Finite automata
Relational algebra
Lambda calculus
Predicate calculus
Set algebra
In the calculus used in Logic Programming, a statement that can be either true or false is called a:
*
1 point
Clause
Functor
Term
Predicate
Constant
Which symbol is commonly used for universal quantification?
*
1 point
∀
∃
¬
∧
→
The existential quantifier asserts that:
*
1 point
The value of the predicate is indeterminate
A predicate is always true
A predicate is always false
There is at least one value for which the predicate is true
There is at least one value for which the predicate is false
A Horn clause is characterized by:
*
1 point
Only facts and no rules
Only ground terms
Exactly one positive literal
No negative literals
Multiple positive literals
Prolog programs are composed primarily of:
*
1 point
Classes and methods
Objects and messages
Facts, rules, and queries
Functions and closures
Procedures and parameters
In Prolog, a fact is best described as:
*
1 point
An unconditional assertion
A negated goal
A recursive rule
A conditional statement
An implication
A Prolog rule has the general form:
*
1 point
C. Head :- Body
A. Head ← Body
B. Body → Head
D. Body :- Head
E. Head = Body
The left side of a Prolog rule is called the:
*
1 point
Goal
Body
Head
Clause
Predicate
In Prolog, variables are identified by:
*
1 point
Digits
D. Uppercase letters or underscore
Underscores only
E. Quoted strings
Lowercase letters
Which of the following is a Prolog atom?
*
1 point
123
_Temp
father
X
Person
The process of matching terms by finding suitable substitutions is called:
*
1 point
Resolution
Instantiation
Backtracking
Binding
Unification
Resolution in Prolog is used primarily to:
*
1 point
Define data types
Enforce typing
Optimize recursion
Allocate memory
Prove queries
Prolog uses which search strategy to satisfy goals?
*
1 point
Breadth-first search
Heuristic search
Bidirectional search
Random search
Depth-first search
When Prolog fails to satisfy a goal, it:
*
1 point
Terminates immediately
Ignores the failure
Backtracks to try alternatives
Raises an exception
Rewrites the rule
Which symbol controls backtracking in Prolog?
*
1 point
Period (.)
Exclamation point (!)
Comma (,)
Hash tag (#)
Semicolon (;)
Which of the following best describes Prolog’s execution order?
*
1 point
Left-to-right, depth-first
Right-to-left, bottom-up
Parallel goal evaluation
Rule-based optimization
Randomized evaluation
Arithmetic in Prolog differs from logical inference because it:
*
1 point
Is purely declarative
Is symbolic
Uses only predicates
Cannot fail
Requires explicit evaluation operators
Which operator forces arithmetic evaluation in Prolog?
*
1 point
=
:=
is
:-
==
A Prolog list is internally represented as:
*
1 point
A hash table
A binary tree
A vector
A head-tail pair
An array
Which Prolog feature allows a predicate to call itself?
*
1 point
Backtracking
Unification
Resolution
Recursion
Quantification
One major deficiency of Prolog is:
*
1 point
Lack of recursion
Weak support for numeric computation
Lack of variables
No symbolic processing
No pattern matching
Another weakness of Prolog is:
*
1 point
Lack of predicates
Absence of lists
Poor string handling
Dependence on execution order
Inefficient unification
Logic programming is particularly well suited for:
*
1 point
Numerical simulation
Database querying
Embedded systems
Real-time graphics
Device drivers
Which application area historically motivated Prolog’s development?
*
1 point
Scientific computing
Business data processing
Operating systems
Web development
Artificial intelligence
In logic programming, a program specifies:
*
1 point
What relationships hold
Control flow explicitly
How to compute a result
Execution order
Memory layout
Compared to imperative languages, logic languages emphasize:
*
1 point
Data abstraction
Iterative loops
Declarative specifications
Assignment statements
State changes
A Prolog query is essentially a:
*
1 point
Predicate definition
Fact
Goal to be proven
Type declaration
Rule
If a Prolog query succeeds, Prolog may return:
*
1 point
Variable bindings
Execution traces only
Optimized rules
Boolean only
Machine code
Prolog is best described as a language that is:
*
1 point
Object-oriented
Declarative and rule-based
Procedural with extensions
Purely imperative
Event-driven
A copy of your responses will be emailed to the address you provided.
Submit
Clear form
Never submit passwords through Google Forms.
reCAPTCHA
Privacy
Terms
This content is neither created nor endorsed by Google. -
Terms of Service
-
Privacy Policy
Does this form look suspicious?
Report
Forms
Help and feedback