 |
at Global Oneness Community.
Share your dreams and let others help you with the interpretation!
Dream Sharing Forum
|
 |
Prolog | A Wisdom Archive on Prolog |  | Prolog A selection of articles related to Prolog |  |
| We recommend this article: Prolog - 1, and also this: Prolog - 2. |
|
More material related to Prolog can be found here:
|
|
|  | |
prolog, Prolog, Prolog - Data types, Prolog - Evaluation, Prolog - Examples, Prolog - Execution, Prolog - Extensions, Prolog - Facts, Prolog - Implementations, Prolog - Parsing, Prolog - Resources, Prolog - Rules, Prolog - Atoms, Prolog - Books/ Tutorials, Prolog - Computer Algebra, Prolog - Conferences, Prolog - External resources, Prolog - Lists, Prolog - Negation, Prolog - Numbers, Prolog - Parser example, Prolog - QuickSort, Prolog - References, Prolog - Strings, Prolog - Terms, Prolog - Tools, Prolog - Towers of Hanoi, Prolog - Tutorial introductions, Prolog - Variables
|  | | » Page 1 « Page 2 Page 3 More » |  |
 | |
|
ARTICLES RELATED TO Prolog |  |  |  | Prolog: Encyclopedia II - Prolog - FactsProgramming in Prolog is very different from programming in a procedural language. In Prolog you supply a database of facts and rules; you can then perform queries on the database. The basic unit of Prolog is the predicate, which is defined to be true. A predicate consists of a head and a number of arguments. For example:
cat(tom).
This enters into the database the fact that 'tom' is a 'cat'. More formally, 'cat' is the head, and 'tom' is the single argument. Here are some sample queries you could ask a Prolog interpreter basing on this fact:
is tom a cat?
?- cat(tom).
yes.
...
See also:Prolog, Prolog - Data types, Prolog - Atoms, Prolog - Numbers, Prolog - Variables, Prolog - Terms, Prolog - Lists, Prolog - Strings, Prolog - Facts, Prolog - Rules, Prolog - Evaluation, Prolog - Negation, Prolog - Execution, Prolog - Parsing, Prolog - Parser example, Prolog - Examples, Prolog - QuickSort, Prolog - Towers of Hanoi, Prolog - Computer Algebra, Prolog - Implementations, Prolog - Extensions, Prolog - Resources, Prolog - Conferences, Prolog - References, Prolog - Tutorial introductions, Prolog - Tools, Prolog - External resources, Prolog - Books/ Tutorials Read more here: » Prolog: Encyclopedia II - Prolog - Facts |
|  |
|
 |  |  | Prolog: Encyclopedia II - Prolog - Examples
Here follows some program examples written in ISO-PROLOG. Check this article for a standard Hello world program in Prolog and several other languages.
Prolog - QuickSort.
split(H, [A|X], [A|Y], Z) :-
order(A, H), split(H, X, Y, Z).
split(H, [A|X], Y, [A|Z]) :-
not(order(A, H)), split(H, X, Y, Z).
split(_, [], [], []).
quicksort([], X, X).
quicksort([H|T], S, X) :-
split(H, T, A, B),
quicksort(A, S, [H|Y]),
quicksort(B, Y, X).
< ...
See also:Prolog, Prolog - Data types, Prolog - Atoms, Prolog - Numbers, Prolog - Variables, Prolog - Terms, Prolog - Lists, Prolog - Strings, Prolog - Facts, Prolog - Rules, Prolog - Evaluation, Prolog - Negation, Prolog - Execution, Prolog - Parsing, Prolog - Parser example, Prolog - Examples, Prolog - QuickSort, Prolog - Towers of Hanoi, Prolog - Computer Algebra, Prolog - Implementations, Prolog - Extensions, Prolog - Resources, Prolog - Conferences, Prolog - References, Prolog - Tutorial introductions, Prolog - Tools, Prolog - External resources, Prolog - Books/ Tutorials Read more here: » Prolog: Encyclopedia II - Prolog - Examples |
|  |
|
 |  |  | Prolog: Encyclopedia II - Prolog - ExecutionProlog is a logical language, so in theory the programmer shouldn't care about how it executes. However, sometimes it is prudent to take into account how the inference algorithm works, to prevent a Prolog program from running for an unnecessarily long time.
For example, we can write code to count the number of elements in a list.
elems([],0).
elems([H|T], X) :- elems(T, Y), X is Y + 1.
This simply says: If the list is empty, the number of elements is zero. If the list is non-empty, then X is one higher than Y, which is the number of elements in the remainder of ...
See also:Prolog, Prolog - Data types, Prolog - Atoms, Prolog - Numbers, Prolog - Variables, Prolog - Terms, Prolog - Lists, Prolog - Strings, Prolog - Facts, Prolog - Rules, Prolog - Evaluation, Prolog - Negation, Prolog - Execution, Prolog - Parsing, Prolog - Parser example, Prolog - Examples, Prolog - QuickSort, Prolog - Towers of Hanoi, Prolog - Computer Algebra, Prolog - Implementations, Prolog - Extensions, Prolog - Resources, Prolog - Conferences, Prolog - References, Prolog - Tutorial introductions, Prolog - Tools, Prolog - External resources, Prolog - Books/ Tutorials Read more here: » Prolog: Encyclopedia II - Prolog - Execution |
|  |
|
 |  |  | Prolog: Encyclopedia II - Logic programming - PrologProlog was an early programming language that was billed by its designers as being based on mathematical logic. The basis for the claim that Prolog was that it used backward chaining from goal to subgoal (as in Planner).
Schematically, the process is:
goal :- subgoal1, ..., subgoaln.
which states that in order to prove goal, it is sufficient to prove subgoal1See also: Logic programming, Logic programming - Basis in mathematical logic, Logic programming - Prolog, Logic programming - Limitations of Prolog as logic programming, Logic programming - Inductive logic, Logic programming - Application domains, Logic programming - History Read more here: » Logic programming: Encyclopedia II - Logic programming - Prolog |
|  |
|
 |  |  | Prolog: Encyclopedia II - Prolog - Data typesProlog does not employ data types in the way common programming languages usually do. We may rather speak about Prolog lexical elements instead of data types.
Prolog - Atoms.
The text constants are introduced by means of atoms. An atom is a sequence consisting of letters, numbers and underscores, which begins with a lower-case letter. Usually, if a non-alphanumeric atom is needed, it is surrounded with apostrophes (e.g. 'an atom containing spaces')............
Prolog - Numbers.
Most Prolog implementations do not distinguish integers from real numbers.
...
See also:Prolog, Prolog - Data types, Prolog - Atoms, Prolog - Numbers, Prolog - Variables, Prolog - Terms, Prolog - Lists, Prolog - Strings, Prolog - Facts, Prolog - Rules, Prolog - Evaluation, Prolog - Negation, Prolog - Execution, Prolog - Parsing, Prolog - Parser example, Prolog - Examples, Prolog - QuickSort, Prolog - Towers of Hanoi, Prolog - Computer Algebra, Prolog - Implementations, Prolog - Extensions, Prolog - Resources, Prolog - Conferences, Prolog - References, Prolog - Tutorial introductions, Prolog - Tools, Prolog - External resources, Prolog - Books/ Tutorials Read more here: » Prolog: Encyclopedia II - Prolog - Data types |
|  |
|
|
|
|
|
|
|
|
|
|
|
|
 |  |  | Prolog: Encyclopedia II - Indeterminacy in computation - Prolog-like concurrent systems were claimed to be based on mathematical logicKeith Clark, Herve Gallaire, Steve Gregory, Vijay Saraswat, Udi Shapiro, Kazunori Ueda, etc. developed a family of Prolog-like concurrent message passing systems using unification of shared variables and data structure streams for messages. Claims were made that these systems were based on mathematical logic. This kind systems was used as the basis of the Japanese Fifth Generation Project (ICOT).
Like the Actor model, the Prolog-like concurrent systems were based on message passing and consequently were subject to the same indetermina ...
See also:Indeterminacy in computation, Indeterminacy in computation - A limitation of logic programming, Indeterminacy in computation - Arrival order indeterminacy, Indeterminacy in computation - A limitation of logic due to lack of information, Indeterminacy in computation - Prolog-like concurrent systems were claimed to be based on mathematical logic, Indeterminacy in computation - Logical operations and system efficiency, Indeterminacy in computation - Indeterminacy in other models of computation Read more here: » Indeterminacy in computation: Encyclopedia II - Indeterminacy in computation - Prolog-like concurrent systems were claimed to be based on mathematical logic |
|  |
|
|
|
 |  |  | Prolog: Encyclopedia II - Quicksort - Performance detailsQuicksort's inner loop, which performs the partition, is amenable to optimization on typical modern machines for two main reasons:
All comparisons are being done with a single pivot value, which can be stored in a register.
The list is being traversed sequentially, which produces very good locality of reference and cache behavior for arrays.
This close fit with modern architectures makes quicksort one of the fastest sorting algorithms on average. Because of this excellent average performance and simple implementation, quicksort has become one of the ...
See also:Quicksort, Quicksort - The algorithm, Quicksort - Version with in-place partition, Quicksort - Performance details, Quicksort - Choosing a better pivot, Quicksort - Partitioning concerns, Quicksort - Other optimizations, Quicksort - Competitive sorting algorithms, Quicksort - Formal analysis, Quicksort - Randomized quicksort expected complexity, Quicksort - Average complexity, Quicksort - Space complexity, Quicksort - Relationship to selection, Quicksort - Sample implementations, Quicksort - C, Quicksort - C++, Quicksort - Haskell, Quicksort - J, Quicksort - Joy, Quicksort - Prolog, Quicksort - SML, Quicksort - Footnotes Read more here: » Quicksort: Encyclopedia II - Quicksort - Performance details |
|  |
|
 | | » Page 1 « Page 2 Page 3 More » |  |
 | |
|
|
More material related to Prolog can be found here:
|
|
|
Search the Global Oneness web site |
|
|
|
 |
|