Search results
Results from the WOW.Com Content Network
The syntax and semantics of Prolog, a programming language, are the sets of rules that define how a Prolog program is written and how it is interpreted, respectively.The rules are laid out in ISO standard ISO/IEC 13211 [1] although there are differences in the Prolog implementations.
Prolog is a logic programming language that has its origins in artificial intelligence, automated theorem proving and computational linguistics. [1] [2] [3]Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily as a declarative programming language: the program is a set of facts and rules, which define relations.
This article describes the syntax and semantics of the purely declarative subset of these languages. Confusingly, the name "logic programming" also refers to a specific programming language that roughly corresponds to the declarative subset of Prolog. Unfortunately, the term must be used in both senses in this article.
There are Prolog implementations that are radically different, with different syntax and different semantics (e.g. Visual Prolog) [2] and sub-communities have developed around different implementations. [2] Code that strictly conforms to the ISO-Prolog core language is portable across ISO-compliant implementations.
However, nested syntax can be regarded as syntactic sugar for unnested syntax. Ciao Prolog, for example, transforms functional syntax into relational form and executes the resulting logic program using the standard Prolog execution strategy. [29] Moreover, the same transformation can be used to execute nested relations that are not functional.
The syntax used by Quintus Prolog was based on that of DEC-10 Prolog. [1] It was long known as the most highly performing implementation of Prolog, and was the first to implement optimisations such as instruction merging and specialisation for the Warren Abstract Machine.
λProlog, also written lambda Prolog, is a logic programming language featuring polymorphic typing, modular programming, and higher-order programming.These extensions to Prolog are derived from the higher-order hereditary Harrop formulas used to justify the foundations of λProlog.
XSB is a compiled dialect of Prolog based on the Warren Abstract Machine. [1] Unlike systems derived from Quintus, XSB uses a module system based on Prolog atoms. [1] It features tabled resolution and supports the HiLog language (permitting limited higher-order logic programming). [1]