Deck 4: Logic Programming

Full screen (f)
exit full mode
Question
An example of a Horn clause is a₁ and a₂ and a₃ →b.
Use Space or
up arrow
down arrow
to flip the card.
Question
Automated deduction systems have difficulty handling all of first-order predicate calculus.
Question
Horn clauses can be viewed as specifications of procedures rather than strictly as implementations.
Question
Logic programming uses second-order predicate calculus.
Question
Theorems are derived from axioms.
Question
The existential quantifier is used to represent all things in the universe that exist.
Question
A logic programming language is a notational system for writing logical statements together with specified algorithms for implementing inference rules.
Question
The statements a → b and b → c then a → c are an example of a typical inference rule.
Question
Horn clauses cannot be given a procedural interpretation.
Question
The ISO standard for Prolog standardized the responses from a Prolog interpreter.
Question
Prolog is the most widely used logic programming language.
Question
Logical statements can be either true or false.
Question
A variable introduced by a quantifier is said to be free and not bound by the quantifier
Question
In Prolog,arithmetic terms can be written in either infix notation or prefix notation.
Question
Resolution is an especially inefficient inference rule for Horn clauses.
Question
The kind of logic used in logic programming is lambda calculus.
Question
In Prolog,you can specify the head and tail of a list using a backslash.
Question
Most Prolog systems are run as interpreters,not compilers.
Question
Statements that can be derived from the logic program are known as queries or goals.
Question
Logical statements can be used as formal specifications for the required behavior of programs.
Question
The semantics of programming language constructs is called ____.

A) logic statements
B) axiomatic semantics
C) syntax
D) specifications
Question
Horn clauses of the form →b are sometimes referred to as ____.

A) queries
B) axioms
C) connectives
D) facts
Question
Prolog applies resolution in a strictly linear fashion,replacing goals from left to right.
Question
Every logical statement can be turned into Horn clauses.
Question
The ____ quantifier represents all things in the universe named by the variable.

A) existential
B) universal
C) global
D) general
Question
In the Horn clause a₁ and a₂ and a₃ → b,the portion a₁ and a₂ and a₃ is called the ____.

A) head
B) body
C) tail
D) query
Question
Prolog completely satisfies the original goal of logic programming.
Question
In the Horn clause a₁ and a₂ and a₃ → b,the variable b is called the ____.

A) head
B) body
C) tail
D) fact
Question
A(n)____ quantifier states that a predicate is true of at least one thing in the universe,indicated by the variable.

A) existential
B) universal
C) global
D) logical
Question
The specific path that an automatic deduction system chooses to derive a statement is the ____ for a logic programming system.

A) axiom
B) theorem
C) control problem
D) deductive database
Question
Most logic programming systems restrict themselves to a particular subset of predicate calculus called ____.

A) axiomatic clauses
B) algorithms
C) Horn clauses
D) control clauses
Question
Programs known as automatic deduction systems ____.

A) solve logic questions
B) determine equality
C) make choices based on input data
D) turn proofs into computation
Question
____ are statements that are assumed to be true and from which other true statements can be proved.

A) Axioms
B) Predicates
C) Logical statements
D) Universal statements
Question
In predicate calculus,arguments to predicates and functions can only be terms - that is,combinations of ____.

A) predicates and connectives
B) constants and predicates
C) variables, constants, and functions
D) predicates, quantifiers, and connectives
Question
Prolog is vulnerable to infinite loops because it uses a depth-first search.
Question
____ is the process of pattern matching to make statements identical.

A) Unification
B) Resolution
C) Instantiation
D) Equalization
Question
Prolog programs use a particular kind of grammar rules called ____.

A) definite clause grammars
B) procedural clause grammars
C) axiom clause grammars
D) reverse clause grammars
Question
Logic programming systems are sometimes referred to as ____.

A) logic queries
B) deductive databases
C) derivative databases
D) successional databases
Question
The set of logical statements that are taken to be axioms can be viewed as the ____.

A) baseline
B) logic program
C) theorem
D) control statement
Question
The process of unification can be used to shorten clauses.
Question
A list is written in Prolog using ____ to enclose the items.

A) curly braces
B) square brackets
C) single quotes
D) double quotes
Question
The closed-world assumption is that all solutions ____ or are assumed false.

A) must be finite
B) must be rational
C) must be proved true
D) must be limited to a closed solution set
Question
In Prolog,the cut operator is used to ____.

A) stop a search of a tree
B) move a node from one tree to another
C) remove a node from a tree
D) prune duplicates from a tree
Question
To force evaluation of an arithmetic term in Prolog,you must use the built-in predicate ____.

A) force
B) evaluate
C) equals
D) is
Question
Variables set equal to patterns are said to be ____.

A) unified
B) instantiated
C) initialized
D) resolved
Question
____ takes the perspective that a program describes what the solution to a problem is,not how that problem is solved.

A) Interpretive programming
B) Resolution
C) Declarative programming
D) Unification
Question
____ Prolog was used as the basis for the Prolog ISO standard.

A) Resolution
B) Horn
C) Unification
D) Edinburgh
Question
Nonmonotonic reasoning is that adding information to a system can ____.

A) decrease the complexity
B) alter the previous information
C) change the order of execution
D) reduce the number of things that can be proved
Question
To force Prolog to perform loops and repetitive searches,we must force backtracking even when a solution is found by using the built-in predicate ____.

A) is
B) fail
C) parent
D) repeat
Question
Prolog uses ____.

A) lowercase for variable names, and uppercase for constants and functions
B) uppercase for variable names, and lowercase for constants and functions
C) lowercase for variable names and constants, and uppercase for functions
D) uppercase for variable names and constants, and lowercase for functions
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 4: Logic Programming
1
An example of a Horn clause is a₁ and a₂ and a₃ →b.
True
2
Automated deduction systems have difficulty handling all of first-order predicate calculus.
True
3
Horn clauses can be viewed as specifications of procedures rather than strictly as implementations.
True
4
Logic programming uses second-order predicate calculus.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Theorems are derived from axioms.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
The existential quantifier is used to represent all things in the universe that exist.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
A logic programming language is a notational system for writing logical statements together with specified algorithms for implementing inference rules.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
The statements a → b and b → c then a → c are an example of a typical inference rule.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
Horn clauses cannot be given a procedural interpretation.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
The ISO standard for Prolog standardized the responses from a Prolog interpreter.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Prolog is the most widely used logic programming language.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Logical statements can be either true or false.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
A variable introduced by a quantifier is said to be free and not bound by the quantifier
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
In Prolog,arithmetic terms can be written in either infix notation or prefix notation.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Resolution is an especially inefficient inference rule for Horn clauses.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
The kind of logic used in logic programming is lambda calculus.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
In Prolog,you can specify the head and tail of a list using a backslash.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
Most Prolog systems are run as interpreters,not compilers.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
Statements that can be derived from the logic program are known as queries or goals.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
Logical statements can be used as formal specifications for the required behavior of programs.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
The semantics of programming language constructs is called ____.

A) logic statements
B) axiomatic semantics
C) syntax
D) specifications
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Horn clauses of the form →b are sometimes referred to as ____.

A) queries
B) axioms
C) connectives
D) facts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Prolog applies resolution in a strictly linear fashion,replacing goals from left to right.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Every logical statement can be turned into Horn clauses.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
The ____ quantifier represents all things in the universe named by the variable.

A) existential
B) universal
C) global
D) general
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
In the Horn clause a₁ and a₂ and a₃ → b,the portion a₁ and a₂ and a₃ is called the ____.

A) head
B) body
C) tail
D) query
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Prolog completely satisfies the original goal of logic programming.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
In the Horn clause a₁ and a₂ and a₃ → b,the variable b is called the ____.

A) head
B) body
C) tail
D) fact
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
A(n)____ quantifier states that a predicate is true of at least one thing in the universe,indicated by the variable.

A) existential
B) universal
C) global
D) logical
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The specific path that an automatic deduction system chooses to derive a statement is the ____ for a logic programming system.

A) axiom
B) theorem
C) control problem
D) deductive database
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Most logic programming systems restrict themselves to a particular subset of predicate calculus called ____.

A) axiomatic clauses
B) algorithms
C) Horn clauses
D) control clauses
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
Programs known as automatic deduction systems ____.

A) solve logic questions
B) determine equality
C) make choices based on input data
D) turn proofs into computation
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
____ are statements that are assumed to be true and from which other true statements can be proved.

A) Axioms
B) Predicates
C) Logical statements
D) Universal statements
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
In predicate calculus,arguments to predicates and functions can only be terms - that is,combinations of ____.

A) predicates and connectives
B) constants and predicates
C) variables, constants, and functions
D) predicates, quantifiers, and connectives
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Prolog is vulnerable to infinite loops because it uses a depth-first search.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
____ is the process of pattern matching to make statements identical.

A) Unification
B) Resolution
C) Instantiation
D) Equalization
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Prolog programs use a particular kind of grammar rules called ____.

A) definite clause grammars
B) procedural clause grammars
C) axiom clause grammars
D) reverse clause grammars
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Logic programming systems are sometimes referred to as ____.

A) logic queries
B) deductive databases
C) derivative databases
D) successional databases
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
The set of logical statements that are taken to be axioms can be viewed as the ____.

A) baseline
B) logic program
C) theorem
D) control statement
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
The process of unification can be used to shorten clauses.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
A list is written in Prolog using ____ to enclose the items.

A) curly braces
B) square brackets
C) single quotes
D) double quotes
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
The closed-world assumption is that all solutions ____ or are assumed false.

A) must be finite
B) must be rational
C) must be proved true
D) must be limited to a closed solution set
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
In Prolog,the cut operator is used to ____.

A) stop a search of a tree
B) move a node from one tree to another
C) remove a node from a tree
D) prune duplicates from a tree
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
To force evaluation of an arithmetic term in Prolog,you must use the built-in predicate ____.

A) force
B) evaluate
C) equals
D) is
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
Variables set equal to patterns are said to be ____.

A) unified
B) instantiated
C) initialized
D) resolved
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
____ takes the perspective that a program describes what the solution to a problem is,not how that problem is solved.

A) Interpretive programming
B) Resolution
C) Declarative programming
D) Unification
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
____ Prolog was used as the basis for the Prolog ISO standard.

A) Resolution
B) Horn
C) Unification
D) Edinburgh
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
Nonmonotonic reasoning is that adding information to a system can ____.

A) decrease the complexity
B) alter the previous information
C) change the order of execution
D) reduce the number of things that can be proved
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
To force Prolog to perform loops and repetitive searches,we must force backtracking even when a solution is found by using the built-in predicate ____.

A) is
B) fail
C) parent
D) repeat
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
Prolog uses ____.

A) lowercase for variable names, and uppercase for constants and functions
B) uppercase for variable names, and lowercase for constants and functions
C) lowercase for variable names and constants, and uppercase for functions
D) uppercase for variable names and constants, and lowercase for functions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.