1/42
A collection of 43 vocabulary-focused flashcards covering unification, arithmetic, lists, control flow (cut, negation), and representative family-tree predicates from the lecture notes.
Unification
The process of making two terms identical by binding variables and equating constants/structures.
Constant Unification
Unifying a constant with itself; constants do not change during unification.
Variable Binding
Assigning a concrete value to a variable.
Variable Unification
Binding a variable to a value or unifying it with another term.
Structural Unification
Unifying two terms with the same functor and arity, potentially binding internal variables.
Failure in Unification
When two terms cannot be unified, resulting in a failed unification.
Variable Identification
Recognizing variables (e.g., X, Y) during clause parsing.
Clause
A Prolog fact or rule; the basic unit of a knowledge base.
Prolog Parser
Component that identifies variables and structure while reading clauses.
Query
A goal asked to the Prolog system to be satisfied.
Forward Chaining
Deriving conclusions from axioms or facts by moving forward from known data.
Backward Chaining
Starting from a goal and resolving it by working backward through rules and facts.
Resolution sequence search
Prolog’s internal, resolution-based search for a solution.
Execution Order
The order in which Prolog processes rules and facts during a query.
Depth-First Backtracking
Prolog explores one path deeply and backtracks on failure to try alternatives.
Choice Point
A point where multiple rule/fact alternatives exist for a goal.
Non-terminating Resolutions
Infinite loops due to recursive rules or unfavorable ordering.
Path/2
A Prolog predicate representing a path relation between nodes.
Edge/2
A Prolog predicate representing a direct connection between two nodes.
Goal
The objective or query Prolog attempts to satisfy.
Infinite Regression
Non-terminating recursive calls that prevent termination.
Declarative vs Imperative Nature of Prolog
Prolog is logic-based but its execution is driven by backtracking, giving it a procedural feel.
is operator
Arithmetic evaluation operator used to assign the value of an expression to a variable.
Arithmetic Expression
An expression that Prolog can evaluate to a numeric value.
X is Expression
Construct that binds X to the value of Expression.
=:= (Arithmetic Equality)
Tests if two arithmetic expressions are equal after evaluation.
= (Arithmetic Not Equal)
Tests if two arithmetic expressions are not equal after evaluation.
== (Term Equality)
Syntactic equality; succeeds if two terms are exactly identical.
= (Term Inequality)
Syntactic inequality; succeeds if two terms are not identical.
Factorial predicate fact/2
Recursive Prolog predicate that computes factorial with base and recursive cases.
Base Case
In recursion, the terminating clause that ends further recursion.
List
A sequence of elements written in square brackets in Prolog.
Head
First element of a list.
Tail
The remainder of a list after the head.
First/2
Predicate that retrieves the first element of a list.
Second/2
Predicate that retrieves the second element of a list.
nth0/3
Predicate to get the Nth element using 0-based indexing.
nth1/3
Predicate to get the Nth element using 1-based indexing.
elementatn/3
Wrapper predicate that uses nth0 to fetch an element by index.
extract_evens/2
Predicate that produces a list of even numbers from a given list.
length/2
Predicate that returns the number of elements in a list.
member/2
Predicate that succeeds if an element is a member of a list.
append/3
Predicate that concatenates two lists into a single list.