Fundamentals of Logic Programming - Vocabulary Flashcards

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/43

flashcard set

Earn XP

Description and Tags

Forty-four vocabulary flashcards covering core concepts in Prolog and logic programming.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

44 Terms

1
New cards

Axioms (Facts and Rules)

Facts and rules that form the knowledge base or theory of a logic program; axioms are assumed truths, rules are implications between facts.

2
New cards

Facts

Statements assumed true that represent basic knowledge.

3
New cards

Rules

Logical implications or relationships that define how new information can be inferred.

4
New cards

Goal Statements

Queries the programmer wants to prove or satisfy; the desired outcomes.

5
New cards

Axioms as a Theory

The collection of facts and rules that forms the knowledge base or theory of the logic program.

6
New cards

Goal Statements as Theorems

Theorems or propositions that the programmer aims to prove or derive from the axioms.

7
New cards

Computation as Deduction

Computation involves deducing new information from the axioms to prove the goal statements.

8
New cards

Interpreter

The component that finds a set of axioms and inference steps that lead to the proof of the goal statements.

9
New cards

Inference

The process of deducing conclusions by applying logical rules to facts.

10
New cards

Proof

The successful determination of a collection of axioms and inference steps that imply the goal statements.

11
New cards

Predicate

A relation (a tuple) that defines a logical connection between its arguments.

12
New cards

Relational Programming

Prolog programming paradigm where relations (predicates) express connections rather than functions.

13
New cards

N-ary Relations

Predicates that involve more than two entities; arity can be greater than 2.

14
New cards

parent/2

A simple relation/fact where parent(tom, bob) defines a parent-child relation; the /2 denotes arity two.

15
New cards

Directionality in Parameters

In Prolog, parameters are not strictly inputs or outputs; their roles can vary by context.

16
New cards

In parameters

Inputs in traditional languages; Prolog does not fix in/out—variables can be used as inputs.

17
New cards

Out parameters

Outputs; variables become bound to produce results when queried.

18
New cards

Knowledge Base

The initial set of facts and rules for a logic program.

19
New cards

Conjunction

Expressed with a comma; all goals separated by the comma must be satisfied.

20
New cards

Disjunction

Expressed with a semicolon; at least one of the goals must be true.

21
New cards

Implication

The ':-' symbol in Horn clauses reads as 'if' or 'is implied by'.

22
New cards

Negation

Negation (not) expresses that a goal should not be true; often used as not(P) in Prolog.

23
New cards

Variables

Unknown values or placeholders; usually start with a capital letter or underscore.

24
New cards

Don’t-Care Variable

The underscore '_' denotes a placeholder where the value is irrelevant.

25
New cards

Comments in Prolog

Actual code comments: single-line using % and multi-line using /* … */.

26
New cards

Atoms

Constants representing names or identifiers; start with a lowercase letter or be quoted.

27
New cards

Numbers

Integers and floating-point numbers, including scientific notation.

28
New cards

Arity

The number of arguments a predicate takes; e.g., loves/2 vs loves/3.

29
New cards

Predicate Name

The name of a predicate; typically starts with a lowercase letter.

30
New cards

Arguments

The terms inside a predicate; can be constants, variables, or complex terms.

31
New cards

Arity distinction

Predicates with different arities are distinct (e.g., loves/2 vs loves/3).

32
New cards

Horn Clauses

A rule form H:-B1,B2,…,Bn (or a fact if there is no body).

33
New cards

Head and Body

In a Horn clause, the head is the relation; the body contains the conditions.

34
New cards

Rule vs Fact

A fact has no body; a rule has a head and a body.

35
New cards

Principle of Resolution

A reasoning principle: resolve clauses to derive a goal from facts and rules.

36
New cards

Unification

Binding variables to make two terms identical; central to Prolog execution.

37
New cards

Backtracking

Exploring alternative paths when a particular search path fails.

38
New cards

Unification: Constant

A constant unifies only with itself.

39
New cards

Unification: Variable

A variable can unify with anything (constants, variables, or structures).

40
New cards

Unification extends recursively

Unification applies not just to top-level terms but to subterms inside compounds.

41
New cards

Equality operator =

In Prolog, equality is implemented via unification using the = operator.

42
New cards

Conjunctive query

A query with multiple goals joined by a comma; all must be true.

43
New cards

Disjunctive query

A query with multiple goals joined by a semicolon; at least one must be true.

44
New cards

Lists

A fundamental data structure for representing sequences of elements in Prolog.