Let's explore a few key constructs for defining programming languages: syntax and
semantics, regular expressions, and finite-state automata.
By understanding these concepts, we can begin to build a foundational understanding of the formal
methods for defining the syntax of a programming language.
Recursion is a popular and powerful problem solving technique. Recursion can be used to
describe structures that have other structures as components and it can be used to solve
problems that involve iterative computations, tree traversal, and list manipulation.
Prolog logically deduces facts about the situations we describe, and gives its deductions back to
us as answers. Writing Prolog applications requires thinking declaratively, recursion, and
recursive data structures.
This has a number of consequences - it requires a different mindset! You will need to see
computational problems from a different perspective. Thinking declaratively rather than
procedurally can be more difficult than it seems, especially to programmers who come from a
procedural or object oriented background. Also, because Prolog is a high-level language,
when programming a knowledge base, rather than writing code to solve a problem, you are define
the problem AS code.
Want to know what Prolog is and how it works? Prolog is a logic programming language. Prolog is
composed of depth first search, unification, recursion, and backtracking. Let's understand
what all of that means
by breaking it down and looking at fundamental concepts.
Write a comment