Term
Express programs in a form of symbolic logic Use a logical inferencing process to produce results Declarative rather than procedural |
|
Definition
Logic (declarative) programming language |
|
|
Term
Logic programming languages are _____ rather than _____. Only specification of _____ are stated. Not detailed _____ for producing them. |
|
Definition
declarative, procedural, results, procedures |
|
|
Term
a logical statement that may or may not be true |
|
Definition
|
|
Term
A proposition consists of _____ and _____ of objects to each other |
|
Definition
|
|
Term
Used for the basic needs of formal logic. Express propositions, express relationships between propositions, describe how new propositions can be inferred from other propositions |
|
Definition
|
|
Term
Particular form of symbolic logic used for logic programming. Use quantified variables over non-logical objects, allow the use of sentences that contain variables |
|
Definition
(first-order) predicate calculus |
|
|
Term
This is an example of _____ _____. For all x, if x is a man then x is mortal. |
|
Definition
|
|
Term
Objects in propositions are represented by simple terms: either _____ or _____ _____ |
|
Definition
constants, quantified variables |
|
|
Term
A symbol that represents an object |
|
Definition
|
|
Term
E.g.: likes(bob, steak); likes, bob, steak are _____ |
|
Definition
|
|
Term
a symbol that can represent different objects at different times |
|
Definition
|
|
Term
E.g.: ∀ X. P (For all X, P is true), where X is a _____ _____; ∀ is a _____ _____ |
|
Definition
quantified variable, universal quantifier |
|
|
Term
Simplest proposition Consist of compound terms |
|
Definition
|
|
Term
Compound terms composed of two parts _____: function symbol that names the relationship. E.g.: student, like Ordered list of parameters (_____) |
|
Definition
|
|
Term
student(jon) like(seth, OSX) like(nick, windows) like(jim, linux) These are examples of _____ _____ |
|
Definition
|
|
Term
Propositions can be stated in two forms: -_____: proposition is assumed to be true -_____: truth of proposition is to be determined |
|
Definition
|
|
Term
-Have two or more atomic propositions -Propositions are connected by logical operators |
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
|
|
Term
|
Definition
There exists a value of X such that P is true |
|
|
Term
Standard form for propositions |
|
Definition
|
|
Term
B1 ∪ B2 ∪ … ∪ Bn ⸦ A1 ∩ A2 ∩ ... ∩ Am |
|
Definition
If all the As are true, then at least one B is true |
|
|
Term
B1 ∪ B2 ∪ … ∪ Bn ⸦ A1 ∩ A2 ∩ ... ∩ Am
What is the antecedent and consequent? |
|
Definition
Antecedent: right side (i.e., Ai ... Am)
Consequent: left side (i.e., B1 … Bn) |
|
|
Term
-Process of inferring a proposition from given propositions
-Allows inferred propositions to be computed from given propositions |
|
Definition
|
|
Term
Infer a proposition given the following propositions:
older(joanne, jake) ⸦ mother(joanne, jake)
wiser(joanne, jake) ⸦ older(joanne, jake) |
|
Definition
wiser(joanne, jake) ⸦ mother(joanne, jake) |
|
|
Term
Finding values for variables in propositions that allow matching process to succeed |
|
Definition
|
|
Term
Assigning temporary values to variables to allow unification to succeed |
|
Definition
|
|
Term
After instantiating a variable with a value, if matching fails, may need to _____ and instantiate with a different value |
|
Definition
|
|
Term
When propositions are used for resolution, only _____ form can be used |
|
Definition
|
|
Term
What are the 2 forms of a Horn clause? |
|
Definition
|
|
Term
Single atomic proposition on left side. E.g.: likes(bob, trout) ⸦ likes(bob, fish) ∩ fish(trout) |
|
Definition
|
|
Term
Empty left side (used to state facts). E.g.: father(bob, jake) |
|
Definition
|
|
Term
Most propositions can be stated as _____ _____ |
|
Definition
|
|
Term
Logic programming is _____ |
|
Definition
|
|
Term
Logic programs do not state _____ a result is to be computed, but rather the _____ of the result |
|
Definition
|
|
Term
- sorted(list) ⸦ ∀j such that 1 ≤ j < n, list(j) ≤ list(j + 1)
- sort(old_list, new_list) ⸦ permute(old_list, new_list) ∩ sorted(new_list)
- permute is a predicate returned true if its _____ parameter is a permutation of its _____ parameter
- sort the items in _____ and put them into _____
|
|
Definition
2nd, 1st, old_list, new_list |
|
|
Term
Prolog
An atom or an integer |
|
Definition
|
|
Term
Symbolic value of Prolog, consists of either:
- a string of letters, digits, and underscores beginning with a lowercase letter
- a string of printable ASCII characters delimited by apostrophes
|
|
Definition
|
|
Term
Prolog
any string of letters, digits, and underscores beginning with an uppercase letter |
|
Definition
|
|
Term
Prolog
- binding of a variable to a value
- Lasts as long as it takes to satisfy one complete goal
|
|
Definition
|
|
Term
Represents atomic proposition. E.g.: functor(parameter list) |
|
Definition
|
|
Term
- Used for the hypotheses
- Headless Horn clauses.
female(shelley).
male(bill).
father(bill, jake). |
|
Definition
|
|
Term
Prolog statement is terminated by a _____ |
|
Definition
|
|
Term
- Used for the hypotheses
- Headed Horn clause
|
|
Definition
|
|
Term
Right side: antecedent (_____ part) |
|
Definition
|
|
Term
Prolog
May be single term OR conjunction |
|
Definition
|
|
Term
Left side: consequent (_____ part) |
|
Definition
|
|
Term
Prolog
Must be single term |
|
Definition
|
|
Term
Multiple terms separated by logical AND operations (implied) |
|
Definition
|
|
Term
- For theorem proving, theorem is in form of proposition that we want system to _____ or _____
- In Prolog, these propositions are called goals (statements) or _____; same format as _____ Horn clause
- _____ propositions are propositions with _____ also legal goals
|
|
Definition
prove, disprove, queries, headless, Conjunctive, variables |
|
|
Term
father(X, mike)
System will then attempt, through _____, to find an instantiation of X that results in a true value |
|
Definition
|
|
Term
Prolog: Inferencing Process
If a goal is a compound proposition, each of the facts is a _____ |
|
Definition
|
|
Term
To prove a goal is true, must find a _____ of inference rules and/or facts |
|
Definition
|
|
Term
Process of proving a subgoal called matching, satisfying, or _____ |
|
Definition
|
|
Term
_____-_____ resolution, _____ chaining
- Begin with facts and rules of database and attempt to find sequence that leads to goal
- Works well with a large set of possibly correct answers
|
|
Definition
|
|
Term
_____-_____ resolution, _____ chaining
- Begin with goal and attempt to find sequence that leads to set of facts in database
- Works well with a small set of possibly correct answers
|
|
Definition
|
|
Term
Prolog implementations use _____ chaining |
|
Definition
|
|
Term
When goal has more than one subgoal, can use either _____-first search or _____-first search |
|
Definition
|
|
Term
Find a complete proof for the first subgoal before working on others |
|
Definition
|
|
Term
Work on all subgoals in parallel |
|
Definition
|
|
Term
Prolog uses _____-first search. Can be done with fewer computer resources |
|
Definition
|
|
Term
- With a goal with multiple subgoals, if fail to show truth of one of subgoals, reconsider previous subgoal to find an alternative solution
- Begin search where previous search left off
- Can take lots of time and space because may find all possible proofs to every subgoal
|
|
Definition
|
|
Term
Built-in structure that displays instantiations at each step |
|
Definition
|
|
Term
Tracing model of execution- 4 events:
- _____ (beginning of attempt to satisfy goal)
- _____ (when a goal has been satisfied)
- _____ (when backtrack occurs)
- _____ (when goal fails)
|
|
Definition
|
|
Term
Prolog supports _____ variables and _____ arithmetic |
|
Definition
|
|
Term
_____ operator: takes an arithmetic expression as right operand and variable as left operand |
|
Definition
|
|
Term
The following is _____: Sum is Sum + Number. |
|
Definition
|
|
Term
speed(ford, 100).
speed(chevy, 105).
speed(dodge, 95).
speed(volvo, 80).
time(ford, 20).
time(chevy, 21).
time(dodge, 24).
time(volvo, 24).
distance(X, Y) :- speed(X, Speed), time(X, Time), Y is Speed * Time.
Solve is query: distance(chevy, Chevy_Distance). |
|
Definition
|
|
Term
A sequence of any number of elements |
|
Definition
|
|
Term
Can be atoms, atomic propositions, or other terms (including other lists) |
|
Definition
|
|
Term
Prolog: List Structures
[apple, prune, grape, kumquat]
[]
[X | Y] /* head _____, tail _____; head: _____, tail: _____ */
[X | Y] = [a, b, c] /* x = _____; y = _____ */ |
|
Definition
X, Y, CAR, CDR, a, [b, c] |
|
|
Term
What is the result of Family?
append([], List, List).
append([Head | List_1], List_2, [Head | List_3]) :- append(List_1, List_2, List_3).
append([bob, jo], [jake, darcie], Family). |
|
Definition
Family = [bob, jo, jake, darcie] |
|
|
Term
The underscore character (_) means an _____ variable - it means we do not care what instantiation it might get from unification |
|
Definition
|
|
Term
Deficiencies of Prolog
- Resolution order control: In a pure logic programming environment, the order of attempted matches is _____ and all matches would be attempted _____
- The closed-world assumption: The only knowledge is what is in the _____
- The negation problem: Anything not stated in the database is assumed to be _____
- Essential limitations: It is easy to state a sort process in _____, but difficult to actually _____ - it doesn't know how to sort
|
|
Definition
nondeterministic, concurrently, database, false, logic, do |
|
|