0% found this document useful (0 votes)
0 views

LJ Unit 8 Comparitive Language

Prolog is a high-level declarative programming language based on first-order predicate logic, designed for symbolic and non-numeric problem-solving through facts, rules, and queries. Its efficiency in logical inference, pattern matching, and knowledge representation makes it suitable for applications in Natural Language Processing, search problems, and knowledge-based reasoning. Key features include rule-based representation, built-in pattern matching, a backtracking mechanism, and a declarative nature that simplifies program understanding and modification.

Uploaded by

Hulda Cau
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

LJ Unit 8 Comparitive Language

Prolog is a high-level declarative programming language based on first-order predicate logic, designed for symbolic and non-numeric problem-solving through facts, rules, and queries. Its efficiency in logical inference, pattern matching, and knowledge representation makes it suitable for applications in Natural Language Processing, search problems, and knowledge-based reasoning. Key features include rule-based representation, built-in pattern matching, a backtracking mechanism, and a declarative nature that simplifies program understanding and modification.

Uploaded by

Hulda Cau
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Discussion Assignment

Prolog stands for Programming in Logic, and it is a high-level declarative


programming language rooted in first-order predicate logic (Horn Clause) and its
internal unification and backtracking mechanism to present knowledge of a problem,
that is: it consists of facts, rules, and queries, which together define relationships
between data elements rather than specifying explicit computational steps (Bramer,
2005; Othman et al., 2023). Different from traditional programming language which is
based on a series of instruction that need to be performed for program execution,
Prolog is designed to handle symbolic, non-numeric problems and is particularly
suited for applications requiring logical inference, pattern matching, and knowledge
representation. The execution of a Prolog program is driven by a goal-directed
search mechanism, using unification (matching of terms) and backtracking
(searching for alternative solutions) to find answers to queries. This makes prolog
the most and particularly efficient for solving problems involving logic, relations, and
searching in state spaces as listed below:

 Thanks to the use of logic reasoning and inference as well as automatic


backtracking, prolog programs are able to perform specialized systems that can
prove or test a theorem (Bramer, 2005). On the other hand, prolog is a powerful
tool when dealing with Natural Language Processing (NLP) such as synthetic
analysis of phrases as well as automatic translations, due to its efficiency in
managing grammatical forms such as Grammatical Definite Clause Grammars
(DCGs), as well as its capacity to represent natural hierarchical structure and
synthetic trees.
 Likewise, prolog is useful in search and resolution of combination problems
such as Sudoku and Puzzles due to Backtracking, use of Constraint Logic
Programming (CLP) and the use of intuitive declarative forms without defining
the algorithm (Othman et al., 2023).
 Prolog can also be used for solving problems such as knowledge-based
reasoning due to its easy representation of facts and rules (e.g., knowledge
base about a specific domain), support for inheritance and rule-based reasoning
as well as efficient resolution of queries on large knowledge bases;
In summary, Prolog’s efficiency in proving solution for different computing problems
is due to its key features such as:

 Rule-based representation: The use of facts and rules by prolog programs,


makes it ideal for encoding expert knowledge in a structured manner
(Bratko, 1986).
 Pattern matching and unification: The language’s built-in pattern-matching
mechanism allows it to infer conclusions based on given facts and rules
efficiently (Bratko, 1986).
 Backtracking mechanism: Prolog systematically explores possible
solutions, making it useful for solving complex decision-making problems
(Bratko, 1986).
 Declarative nature: Unlike imperative languages, Prolog focuses on what
needs to be solved rather than how, making programs easier to understand
and modify (Bratko, 1986).

References

Bramer, M. (2005). Logic programming with Prolog. In Springer eBooks. Springer.


https://drive.uqu.edu.sa/_/fbshareef/files/textbook.pdf
Bratko, I. (1986). Prolog Programming for artificial intelligence (International
Computer Science Serie). Addison-Wesley Publishers Limited.
https://silp.iiita.ac.in/wp-content/uploads/PROLOG.pdf
Othman, J., Othman, M., & Jan, N. Y. C. (2023). Logic programming with Prolog.
Artificial Intelligence, 138(1–2), 1–6.
https://appspenang.uitm.edu.my/sigcs/2023-2/Articles/20234_LogicProgrammingWit
hProlog.pdf

You might also like